Comments (8)
I'll have this fixed hopefully by the end of today when I've smoothed off the edges of the GUI (though in hindsight I should've commited the fix first...)
from pytoast.
it wouldn't surprise me if the ordering isn't preserved in some places.
I'm pretty sure it is last time I checked, but I'll change this anyway as it'll make it clearer.
May bloat filesize a bit though.
from pytoast.
it wouldn't surprise me if the ordering isn't preserved in some places.
I'm pretty sure it is last time I checked, but I'll change this anyway as it'll make it clearer.
In the JSON specification it says its unordered, and doing a quick Google search I found people complaining their library doesn't preserve ordering.
May bloat filesize a bit though.
A trade could also be made. It would probably save more space to use, say, a smaller hash like MD5 (which should work fine for checking unintentional file corruption, and comparing files.)
from pytoast.
it wouldn't surprise me if the ordering isn't preserved in some places.
I'm pretty sure it is last time I checked, but I'll change this anyway as it'll make it clearer.
In the JSON specification it says its unordered, and doing a quick Google search I found people complaining their library doesn't preserve ordering.
Thats fair enough.
May bloat filesize a bit though.
A trade could also be made. It would probably save more space to use, say, a smaller hash like MD5 (which should work fine for checking unintentional file corruption, and comparing files.)
You're probably right but in the future if I did want to add signing for whatever reason it'd be easier to throw on if the hash to begin with was secure enough.
Reducing the digest size seems like a good idea but there may be some crippling issue with this I haven't realised yet probably.
from pytoast.
Actually, I should mention that having multiple keys that are the same are also a problem. Many libraries just put in the last or first occurance of an object with a duplicate key. Whether it's valid JSON is ambiguous at best. I think a more correct/idiomatic version would be something like this:
{
"revisions": [
{
"revision": 1,
"files": [
{
"file": "path/to/file",
"digest": "DEADBEEF"
},
{
"file": "path/to/other/file",
"digest": "DEADBEEF"
}
]
},
{
"revision": 2,
"files": [
{
"file": "path/to/file",
"digest": "DEADBEEF"
}
]
}
]
}
from pytoast.
This does look a bit better actually.
It's also a bit harder to implement as the current code flow in the packer goes "handle file -> does it exist in the old one -> increment rev by one". I don't think this would be that hard actually but I'd like to get some other opinions on this first as I'd like the schema to be rock-solid so there's hopefully no more breaking changes. Adding an RFC tag.
from pytoast.
Might it be worth opening a separate issue for the schema in general?
from pytoast.
Good idea actually.
from pytoast.
Related Issues (13)
- toast HOT 1
- multiprocessing.pool.Remotetraceback HOT 3
- Redundant downloading HOT 10
- memfile is hashed even if hashing and signing are disabled HOT 2
- Option to download plain, uncompressed files HOT 22
- Further improvements HOT 2
- General Schema/Protocol improvements HOT 8
- Hashing/UUID algorithm/version
- 'branches' support HOT 3
- dedicated revision information folder HOT 18
- Store used URL to verify objects HOT 8
- Product information
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pytoast.