Open phated opened 1 year ago
I assume this is because of the recent change to avoid recompiling the same file when it is required by multiple crate dependencies. We'll still want to avoid recompiling in that case so perhaps we need to store timestamps and check when each file was last changed as well.
+1 Having a checksum for build artifacts is a good stepping-stone here
Problem
Currently, the compiler expects a clean-slate environment and builds the entire program from scratch. However, in the LSP, we want to build the project once and then recompile individual files with the same
Context
. This isn't possible currently because the compiler returns immediately if it sees a CrateID in the def_map.Happy Case
We should be able to create a
Context
once and build the entire project once, then afterwards we should be able to compile a single file given the storedContext
.Alternatives Considered
No response
Additional Context
Ref https://github.com/noir-lang/noir/pull/1891
Would you like to submit a PR for this Issue?
No
Support Needs
No response