emptyrivers / archivist Goto Github PK
View Code? Open in Web Editor NEWLicense: Creative Commons Zero v1.0 Universal
License: Creative Commons Zero v1.0 Universal
see: rossnichols/LibSerialize#4 & SafeteeWoW/LibDeflate#6 (neato)
pros: interactions which don't need to be snappy can be put on the back burner, migration can have less risk of smashing against the script timout boundary
cons: more complex, boring to write
should probably do it
wtb robust dependency resolution pls
oops. parsing a key/value should only consume up to the next key/value marker, or object separator for values
Using your branch from WeakAuras/WeakAuras2#2067
When typing /wa repair i get this error
1x WeakAuras\Libs\Archivist\Archivist.lua:555: Encountered unexpected token type while parsing object. Expected "KEY" but got "VALUE".
[string "=[C]"]: in function `error'
[string "@WeakAuras\Libs\Archivist\Archivist.lua"]:53: in function `Assert'
[string "@WeakAuras\Libs\Archivist\Archivist.lua"]:555: in function <WeakAuras\Libs\Archivist\Archivist.lua:533>
[string "@WeakAuras\Libs\Archivist\Archivist.lua"]:574: in function `DeArchive'
[string "@WeakAuras\Libs\Archivist\Archivist.lua"]:299: in function <WeakAuras\Libs\Archivist\Archivist.lua:290>
[string "=(tail call)"]: ?
[string "=(tail call)"]: ?
[string "@WeakAuras\ArchiveTypes\Repository.lua"]:56: in function <WeakAuras\ArchiveTypes\Repository.lua:52>
[string "=(tail call)"]: ?
[string "=(tail call)"]: ?
[string "@WeakAuras\WeakAuras-@[email protected]"]:2824: in function <WeakAuras\WeakAuras.lua:2818>
Line 338 in 7a29987
The current implementation of the Archivist:DeleteAll(storeType)
function nils out the named store table in self.sv
when a store type is explicitly passed. This leads to the rest of Archivist breaking if you then call other functions for the store type that was just deleted.
If called without an explicit store type the self.sv
entries for each store type aren't nilled out and are instead replaced with empty tables, leaving Archivist functioning fine when other functions are called.
Very basic test case:
Archivist:Initialize({});
print(Archivist.sv.ReadOnly);
Archivist:DeleteAll("ReadOnly");
print(Archivist.sv.ReadOnly);
Archivist:Create("ReadOnly", "TestStore", ":)"); -- Error! :(
print(Archivist.sv.ReadOnly.TestStore);
This will throw the following error once it calls the Create function:
4x SecretProject\Libs\Archivist\Archivist.lua:200: attempt to index field '?' (a nil value)
[string "@SecretProject\Libs\Archivist\Archivist.lua"]:200: in function `Create'
Compared to the alternative of not passing a store name, no error occurs:
Archivist:Initialize({});
print(Archivist.sv.ReadOnly);
Archivist:DeleteAll();
print(Archivist.sv.ReadOnly);
Archivist:Create("ReadOnly", "TestStore", ":)");
print(Archivist.sv.ReadOnly.TestStore);
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.