Comments (9)
Hey :)
Are you reporting this to this repo because of the "circular structure" JSON.stringify error? If not, then this looks like a normal error due to wrong use of toposort. Toposort throws an error if you try to sort circular data.
from toposort.
@marcelklehr yes i'm talking about the ""circular structure" JSON.stringify error". I'm not the one using toposort here, it seems to be a dep of webpack 4 and when the dep is >= 1.0.7 I have this error, when I force toposort to 1.0.6 or under it works
from toposort.
toposort@^1.0.0:
version "1.0.6"
resolved "https://registry.yarnpkg.com/toposort/-/toposort-1.0.6.tgz#c31748e55d210effc00fdcdc7d6e68d7d7bb9cec"
this works without an error, but any time I upgrade something I get this lock with the error mentioned in the console
toposort@^1.0.0:
version "1.0.7"
resolved "https://registry.yarnpkg.com/toposort/-/toposort-1.0.7.tgz#c31748e55d210effc00fdcdc7d6e68d7d7bb9cec"
from toposort.
when I force toposort to 1.0.6 or under it works
oh. Interesting!
from toposort.
However, the exact error you describe cannot happen with v1.0.7 anymore, because line 21 has been changed v1.0.4...v1.0.7
This diff also shows the difference between version 1.0.4 and v1.0.7 which is one test and said change around line 21. I highly doubt that there's an input that throws an error in v1.0.7 but doesn't in v1.0.4, but if you like you can create a gist or a repo that I can use to reproduce and debug.
from toposort.
from toposort.
Good morning, everybody.
I've got the same issue with toposort recently. While the real problem was in my Vue code (circular dependency in one of the components) toposort failed with "circular structure" in JSON.stringify.
It is turned out that when toposort investigates the circular dependency error it tries to throw out a Error and notify about it, however, it also tries to use JSON.stringify on the incoming json structure.
In my case the json structure was circular too so toposort failed to throw Error and hid the original reason.
This happened on 1.0.4 and 1.0.6.
Hope this helps.
from toposort.
from toposort.
Hey @marcelklehr ,
thank you for the suggestion, the error processing code is much better now. I will update the dependency :)
from toposort.
Related Issues (16)
- Does not work for nodes that have multiple dependencies HOT 3
- Throws "cyclic dependency" error where there is none HOT 2
- How do you handle a node that has no dependency on anything else? HOT 2
- Wrong sort example? HOT 1
- vertices not specified in nodes causes unpredictable behaviour HOT 3
- Doc from NPM is completely wrong HOT 1
- Version 1.0.0 HOT 1
- What changed for 1.0 HOT 1
- Exclude graph.jpg from (NPM) package HOT 2
- Is this tool able to detect circular dependencies? HOT 2
- Cyclic dependency error HOT 32
- Allow passing a sort function as a tie breaker
- Error in the "Unknown Node" test and Vows runner hangs HOT 2
- On Cyclical Dependency Error: Include Id Property In Error Object?
- Deno support HOT 4
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 toposort.