-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix language service panic when file isn't listed in the
files
fiel…
…d of `qsharp.json` (#2109) Fixes #2090 Notably, this also changes how we treat the `files` field in `qsharp.json` for local projects their local dependencies. Previously, if the `qsharp.json` explicitly listed any `files` , 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 the `files` list.
- Loading branch information
1 parent
3ff4980
commit e4ef02e
Showing
10 changed files
with
659 additions
and
1,119 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 4 additions & 3 deletions
7
compiler/qsc_project/src/tests/projects/explicit_files_list/qsharp.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
{ | ||
"author": "Microsoft", | ||
"files" : [ | ||
"src/Main.qs" | ||
"files": [ | ||
"src/Main.qs", | ||
"src/Other.qs" | ||
] | ||
} | ||
} |
File renamed without changes.
6 changes: 6 additions & 0 deletions
6
compiler/qsc_project/src/tests/projects/explicit_files_list_missing_entry/qsharp.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"author": "Microsoft", | ||
"files" : [ | ||
"src/Main.qs" | ||
] | ||
} |
4 changes: 4 additions & 0 deletions
4
compiler/qsc_project/src/tests/projects/explicit_files_list_missing_entry/src/Main.qs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
namespace Dependency { | ||
function LibraryFn() : Unit { | ||
} | ||
} |
4 changes: 4 additions & 0 deletions
4
compiler/qsc_project/src/tests/projects/explicit_files_list_missing_entry/src/NotIncluded.qs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
namespace Dependency { | ||
function LibraryFn() : Unit { | ||
} | ||
} |
Oops, something went wrong.