Comments (3)
Sort + deduplication is probably the way to go. We do this for some responses, just because it makes the output deterministic and therefore easy to test. But apparently we aren't (yet) doing it for diagnostics.
from nickel.
I wonder what's the best way to avoid this case in the recursive setting. I think @jneem mentioned somewhere that it's not as simple as black-holing or marking fields to not re-evaluate them many times (otherwise we would do that instead of having a max evaluation depth, and also because I guess one field might end up having different copies in different merge expressions, and thus with a different environment).
Maybe just compute a cheap hash of diagnostics and de-duplicate them is the easiest way forward.
from nickel.
(Or, put differently, store the diagnostics in an ordered set [or maybe we don't event care about ordering?] with a cheap hasher instead of a vector)
from nickel.
Related Issues (20)
- List equality in contracts can cause some big slowdowns when applied several times HOT 7
- A way to assign a variable to a field with the same name HOT 1
- LSP: Completion shouldn't suggest variable names for record fields HOT 1
- A completion candidate can shadow a more informative one HOT 3
- Unresolved import causes `nls` to panic HOT 5
- Auto-generate Nickel contracts from Kubernete resource specifications HOT 1
- Non-deterministic typecheck LSP errors when modifying a transitive import of a file HOT 1
- LSP crash on _some_ modifications of a file imported in another HOT 1
- `std.record.get_or` is not working as expected HOT 1
- Wrong version is reported by `nickel --version` for release artifacts HOT 7
- Variant of `std.contract.from_predicate` to specify an error message
- Some utilities in `std.array`: `remove_duplicates` and `filter_map` HOT 5
- Allow my users to use contracts shared on GitHub HOT 2
- `nickel doc` overflows the stack with recursive schemas HOT 2
- Forward the metadata when re-exporting a field HOT 1
- Hovering on a record field defined several times will only show the information for the first definition HOT 1
- Filter out the contract annotations on hover/completion when they don't add anything
- Output query results as JSON HOT 4
- Add empty YAML header when exporting
- Encode/decode JSON string HOT 2
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 nickel.