Giter Site home page Giter Site logo

Comments (4)

simonzkl avatar simonzkl commented on June 10, 2024 1

After narrowing it down, I think just switching to yaml triggers this one. It's a different line than I wrote though. Mentioned it from memory, so it was incorrect.

import "test.yaml"
[2023-06-20T06:58:23Z TRACE nls::files] Parsed, checking types
[2023-06-20T06:58:23Z DEBUG nls::linearization] adding term: Null @ None
[2023-06-20T06:58:23Z DEBUG nls::linearization] linearizing
[2023-06-20T06:58:23Z DEBUG nls::linearization] unresolved references: []
[2023-06-20T06:58:23Z DEBUG nls::linearization] adding term: ResolvedImport(FileId(4)) @ Original(RawSpan { src_id: FileId(3), start: ByteIndex(1), end: ByteIndex(19) })
thread 'main' panicked at 'TermPos::unwrap', lsp/nls/src/linearization/mod.rs:471:38
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
[Error - 08:58:23] Connection to server got closed. Server will not be restarted.

from nickel.

simonzkl avatar simonzkl commented on June 10, 2024

Anecdotally, I've also had it panic in a different location for the same reason:

// This is safe because the import file is resolved, before we linearize
// the containing file, therefore the cache MUST have the term stored.
let term = lin.cache.get(*file).unwrap();
let position = final_term_pos(&term);

from nickel.

yannham avatar yannham commented on June 10, 2024

@simonzkl I have a fix for my simple test case (and which makes sense with respect to the original location of the panic). But I didn't hit the second location yet. Maybe it's an artifact of the first issue, but just in case, would you mind sharing the JSON file you tried?

from nickel.

yannham avatar yannham commented on June 10, 2024

Ok, this is more in line with my own findings. Thanks!

from nickel.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.