Closed ausbin closed 2 years ago
Posting another revision based on what we talked about today. Tested again manually with Azure Notebooks and running dotnet test
.
I am hitting #1470 again locally with .NET SDK 6.0.302, so I had to manually lock my local global.json
(s) at 6.0.301. Oh me.
Rebased this against main
and #1462 has left the language server tests in a broken state. To test this locally, I applied the following hack:
diff --git a/src/QsCompiler/LanguageServer/global.language-server.json b/src/QsCompiler/LanguageServer/global.language-server.json
index 3b31a29a..2a1043b5 100644
--- a/src/QsCompiler/LanguageServer/global.language-server.json
+++ b/src/QsCompiler/LanguageServer/global.language-server.json
@@ -1,6 +1,5 @@
{
"sdk": {
- "version": "6.0.302",
- "rollForward": "latestPatch"
+ "version": "6.0.301"
}
}
is this a "hack" to make notebook experience nice, or is this something that will be "officially" reflected in the language specification too (no mandatory namespace declaration in certain contexts)?
@filipw I would call this a hack at the moment, specifically to make Q# IntelliSense work on Azure Notebooks.
We have discussed adding this to the Q# spec as "REPL mode", but that's out of my pay grade. The language changes would be:
%simulate
) as comments, or maybe even parsing them (undecided)namespace{}
blocks in favor of an implicit namespaceopen
directives scoping to this entire implicit namespace instead of just the cell where they're executed
This is a smaller PR for syntax checking (no semantic checking) for
namespace{}
blocks in notebooks, because #1457 was getting out of control.Magic commands are broken in this code, but that is out of scope for this PR. The goal here is to get this code for syntax checking for
namespace{}
blocks (which hasn't changed too much in several weeks) reviewed and merged into the feature branch.Testing