Skip to content
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

Conditional compilation for individual capabilities #996

Closed
sezna opened this issue Jan 9, 2024 · 4 comments
Closed

Conditional compilation for individual capabilities #996

sezna opened this issue Jan 9, 2024 · 4 comments
Assignees
Labels
design needed enhancement New feature or request

Comments

@sezna
Copy link
Contributor

sezna commented Jan 9, 2024

We currently support @Config(Base) and @Config(Full). But, eventually, we will want to conditionally compile code for individual capabilities. See #882 for additional context.

This syntax could also be used to opt a Q# project in to new language features, like new UDT syntax. Similar to Rust's #! or Haskell's language extensions. See #543 for more context on that.

@sezna sezna added enhancement New feature or request needs triage labels Jan 9, 2024
@cesarzc
Copy link
Contributor

cesarzc commented Feb 1, 2024

@sezna if you start working on this, could we sync to talk through some options to make sure we can use it in the multiple scenarios conditional compilation would be useful?

@sezna
Copy link
Contributor Author

sezna commented Feb 13, 2024

@cesarzc Yes certainly. We now have feature opt-in, for #543, but I haven't started any work on general conditional compilation. Let's work out a design for this together.

github-merge-queue bot pushed a commit that referenced this issue Apr 8, 2024
)

In order to support adaptive profile selection in VS we have to add
`Adaptive` as a compilation attribute in the std lib. This is a
workaround until we design a full solution to address #996. This PR adds
adaptive as a profile.

Functionality to enable adaptive profile VSCode is hidden behind a
config value, as is using the preview QIR code generation from VSCode.

QIR generation for Adaptive/Unrestricted from Python will continue to
raise exceptions.

Adaptive is a profile allowed in the Python APIs, but warnings will be
issued to users indicating that this functionality is in preview.

The language service will surface RCA errors in VSCode and Python, but
not the Notebooks (will be handled in a follow up PR).
Other integration features are being tracked in #1294 and this PR is not
expected to have all functionality enabled.

---------

Co-authored-by: Alex Hansen <[email protected]>
Co-authored-by: Stefan J. Wernli <[email protected]>
Co-authored-by: Mine Starks <[email protected]>
@sezna sezna self-assigned this Aug 13, 2024
@sezna
Copy link
Contributor Author

sezna commented Aug 13, 2024

@swernli says we've done this, he will verify.

@sezna sezna assigned swernli and unassigned sezna Aug 13, 2024
@swernli
Copy link
Collaborator

swernli commented Aug 13, 2024

Fixed by #1393

@swernli swernli closed this as completed Aug 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
design needed enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants