-
Notifications
You must be signed in to change notification settings - Fork 113
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
Packages for Q# #1693
Packages for Q# #1693
Conversation
This reverts commit 86e99b9.
…tarks/package-resolution
@@ -49,12 +49,16 @@ | |||
|
|||
impl CompilationContext { | |||
fn new(source: &str) -> Self { | |||
let mut store = qsc::PackageStore::new(qsc::compile::core()); | |||
// TODO(alex) ask cesarzc if std is wanted here |
Check notice
Code scanning / devskim
A "TODO" or similar was left in source code, possibly indicating incomplete functionality Note 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.
@cesarzc should these tests include the stdlib or no?
Change in memory usage detected by benchmark. Memory Report for 3b462ee
|
Benchmark for 3b462eeClick to view benchmark
|
Change in memory usage detected by benchmark. Memory Report for 6437607
|
Benchmark for 6437607Click to view benchmark
|
Superseded by #1698 |
This PR: 1. Refactors the compiler API such that the caller passes in a constructed package store, allowing for dependencies to be pre-compiled and inserted before compiling user code 2. Introduces the `BuildableProgram` abstraction, which encapsulates the notion of "some user code that is ready to compile, along with a package store that has all of its dependencies compiled" 3. As a drive-by fix, fixes circuits for internal operations 4. Removes the notion of `Visibility` from the AST, since visibility is calculated via exports now. `internal` is still parsed without error for backwards compatibility, but is a no-op because `internal` is the default now. 5. Enforces visibility in the HIR, where items must be `Visibility::Public` to show up across packages as a `GlobalItem` 6. Adds export statements to the standard library to preserve the existing API with the new internal-by-default semantics 7. Inserts all packages into the user code's namespace tree with the prefix defined as the package alias in the `qsharp.json` closes #883 The Q# formatting CI stage will fail until #1692 goes in This PR supersedes #1693
WIP branch, putting it up for code review meetings
This PR:
BuildableProgram
abstraction, which encapsulates the notion of "some user code that is ready to compile, along with a package store that has all of its dependencies compiled"Visibility
from the AST, since visibility is calculated via exports now.internal
is still parsed without error for backwards compatibility, but is a no-op becauseinternal
is the default now.Visibility::Public
to show up across packages as aGlobalItem
qsharp.json
closes #883
The Q# formatting CI stage will fail until #1692 goes in