Skip to content

Frontend: Really allow any experimental feature when compiling a module interface #72681

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

Conversation

tshortli
Copy link
Contributor

The fix for #72632 was not sufficient because when modules are built from textual interface that happens in a sub-invocation which does not have typecheck-from-interface or compile-from-interface requested action. Instead of checking a requested action, set a language option to control whether non-production experimental features are allowed.

Resolves rdar://125561443

…le interface.

The fix for swiftlang#72632 was not sufficient
because when modules are built from textual interface that happens in a
sub-invocation which does not have typecheck-from-interface or
compile-from-interface requested action. Instead of checking a requested
action, set a language option to control whether non-production experimental
features are allowed.

Resolves rdar://125561443
@tshortli tshortli requested a review from artemcm as a code owner March 28, 2024 21:48
@tshortli
Copy link
Contributor Author

@swift-ci please smoke test

@tshortli tshortli requested review from xymus, nkcsgexi, elsh and rintaro March 28, 2024 21:49
@drodriguez
Copy link
Contributor

Can you add a REQUIRES: asserts in test/ModuleInterface/ExperimentalFeatures.swiftinterface that was modified in #72632 ?

Otherwise it fails if one tries to run the tests in a noasserts compiler with:

<unknown>:0: error: unexpected error produced: experimental feature 'ParserRoundTrip' cannot be enabled in production compiler
<unknown>:0: error: diagnostic produced elsewhere: experimental feature 'ParserRoundTrip' cannot be enabled in production compiler

@tshortli
Copy link
Contributor Author

Can you add a REQUIRES: asserts in test/ModuleInterface/ExperimentalFeatures.swiftinterface that was modified in #72632 ?

Otherwise it fails if one tries to run the tests in a noasserts compiler with:

<unknown>:0: error: unexpected error produced: experimental feature 'ParserRoundTrip' cannot be enabled in production compiler
<unknown>:0: error: diagnostic produced elsewhere: experimental feature 'ParserRoundTrip' cannot be enabled in production compiler

This PR is fixing that issue you're reporting. Adding REQUIRES: asserts would defeat the purpose of the test; it is meant to validate that the test works in no_asserts, I just didn't accomplish that correctly on the first try.

@drodriguez
Copy link
Contributor

Sorry then, I misunderstood how the fix worked.

@tshortli tshortli merged commit f5c3775 into swiftlang:main Mar 29, 2024
@tshortli tshortli deleted the allow-non-production-features-in-module-interface-redux branch March 29, 2024 03:34
@FouadMagdy01
Copy link

Can you add a REQUIRES: asserts in test/ModuleInterface/ExperimentalFeatures.swiftinterface that was modified in #72632 ?
Otherwise it fails if one tries to run the tests in a noasserts compiler with:

<unknown>:0: error: unexpected error produced: experimental feature 'ParserRoundTrip' cannot be enabled in production compiler
<unknown>:0: error: diagnostic produced elsewhere: experimental feature 'ParserRoundTrip' cannot be enabled in production compiler

This PR is fixing that issue you're reporting. Adding REQUIRES: asserts would defeat the purpose of the test; it is meant to validate that the test works in no_asserts, I just didn't accomplish that correctly on the first try.

How did you solve this
I get this issue
<unknown>:0: experimental feature 'OpaqueTypeErasure' cannot be enabled in a production compiler

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants