-
Notifications
You must be signed in to change notification settings - Fork 97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix language service panic when file isn't listed in the files
field of qsharp.json
#2109
base: main
Are you sure you want to change the base?
Conversation
…eld of qsharp.json
a3d9843
to
b24e63b
Compare
files
field of qsharp.json
@@ -436,7 +440,12 @@ fn explicit_files_list() { | |||
packages: {}, | |||
}, | |||
lints: [], | |||
errors: [], | |||
errors: [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nitpick: I'd prefer duplicating the original test, leaving it as the "confirm no errors in good configuration" test and making the copy a test specific to this new error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry about the unrelated changes. There are 2 new test cases here which ARE relevant.
I changed how we format the test output in these files, so that they are readable and only include the information that the tests are concerned with.
I got fed up with the ridiculously long Debug
outputs we had been using.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Righteous fix!
); | ||
} | ||
|
||
#[tokio::test] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here are the 2 new test cases, in case you have trouble finding it in the noise.
Fixes #2090
Notably, this also changes how we treat the
files
field inqsharp.json
for local projects their local dependencies.Previously, if the
qsharp.json
explicitly listed anyfiles
, that list would take priority and we would skip crawling the directory.With this change: we always crawl the
src/
directory and include all found*.qs
files in the project. But we raise an explicit error to the user if any of those files are missing from thefiles
list.