Comments (11)
@diasdavid okie! test added
from js-ipld.
@vmx just getting this on your radar :)
from js-ipld.
Thanks for reporting this bug. It is a fun one indeed!
A simple (and I believe to be the wisest) solution would be to make a copy at the beginning of put, however, that would force us to add a copy function to the interface-ipld-format so that we know how to make a 1:1 copy of any format.
Mind submitting a PR with a test?
from js-ipld.
Hmm do we need a ipldXResolver.clone method?
from js-ipld.
@kumavis if we go with that solution, then yes
from js-ipld.
Hmm do we need a ipldXResolver.clone method?
i think i would argue against it since we have serialize. Which is copying in a sense. If we serialized once then hashed the serialized data instead of serializing twice then invalid blocks coudn't be generated
from js-ipld.
@wanderer it would work for this case, yes, but getting .copy
would prevent other weird scenarios int he future. We can: a) solve this by taking in your proposal -- ipld/interface-ipld-format#7 -- and b) keep considering adding .copy
to interface-ipld-format.
from js-ipld.
@diasdavid in which case would this not work? I can't think of anything off the top of my head. But if there are things that mutate the serialized version somehow then i guess we could aslo specify that serialize
does a copy
from js-ipld.
It will work 👍
from js-ipld.
ipld/interface-ipld-format#32 will resolve this. cid
will take the serialised output not the dagNode.
from js-ipld.
As cid()
is now taking the serialized version of a node, that's not an issue anymore.
from js-ipld.
Related Issues (20)
- An in-range update of ipfs-repo is breaking the build 🚨 HOT 2
- An in-range update of multicodec is breaking the build 🚨 HOT 3
- An in-range update of multicodec is breaking the build 🚨 HOT 2
- An in-range update of ipld-raw is breaking the build 🚨 HOT 2
- An in-range update of ipld-ethereum is breaking the build 🚨 HOT 2
- An in-range update of aegir is breaking the build 🚨 HOT 2
- An in-range update of aegir is breaking the build 🚨 HOT 5
- Enhancement: Remove dependency on IPFS Blockservice HOT 7
- An in-range update of multicodec is breaking the build 🚨 HOT 2
- An in-range update of aegir is breaking the build 🚨 HOT 7
- An in-range update of aegir is breaking the build 🚨 HOT 2
- An in-range update of ipld-in-memory is breaking the build 🚨 HOT 2
- An in-range update of ipld-in-memory is breaking the build 🚨 HOT 2
- An in-range update of ipfs-repo is breaking the build 🚨 HOT 3
- An in-range update of aegir is breaking the build 🚨 HOT 2
- IPLD with multithreading constraints HOT 1
- Usage instructions fail when run in jest. HOT 2
- TypeError: Cannot read property 'length' of undefined
- Examples of connecting js-ipld to a local IPFS node? HOT 4
- Typings for typescript users? HOT 1
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 js-ipld.