Comments (7)
We can build a graph of dependencies as we go through the tokens and then we check whether the graph is circular.
from parselglossy.
I see two options:
- we detect circular dependencies and stop with a nice error
- we allow them but ignore them but we only apply "from top to bottom", single-pass
My preference goes to detecting and stopping to avoid surprises.
from parselglossy.
Agreed on detect-and-stop. Not so clear how you'd detect though.
from parselglossy.
Sounds good, hopefully there's a library for that
from parselglossy.
I am tempted to program this myself as a little challenge. There are codes and libraries but they seem to be not lightweight for this relatively simple task.
from parselglossy.
I see a graph as a dictionary mapping a
to List[a]
.
I thought about it some more and I see no difficulties detecting cycles in a graph - the difficulty that I see is to translate defaults (and predicates?) into a graph since we use eval there and don't directly have access to the nodes of the graph.
from parselglossy.
Closed in favor of #76 which has an actual example of chained dependencies which might degenerate into being circular.
from parselglossy.
Related Issues (20)
- GitHub Action producin PyPI package does not trigger on release HOT 13
- Input parsing is silent on some type errors HOT 3
- Whitespace and newlines in coordinate sections between content and $end is not stripped HOT 1
- Add a Path type HOT 2
- JOSS paper HOT 2
- Deprecation mechanism for sections or keywords HOT 4
- Arbitrary callbacks on the input tree HOT 5
- pydantic for validation HOT 2
- JSON and floating point precision HOT 8
- Improve design documentation HOT 1
- Add page linking to codes using parselglossy HOT 3
- Chain of dependencies HOT 12
- Document how to use grammar specifications different from packaged ones HOT 4
- --doctest-module flag is not recognized HOT 2
- Multiple definitions of keywords HOT 3
- Reactivate macOS builds HOT 2
- Not sure how to run the script/generator HOT 5
- Fix the PyPI deploy step HOT 1
- Consider adding Union type 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 parselglossy.