Remove feature flag for transitive #: directives#54012
Remove feature flag for transitive #: directives#54012jjonescz wants to merge 2 commits intodotnet:release/10.0.4xxfrom
#: directives#54012Conversation
There was a problem hiding this comment.
Pull request overview
Removes the feature-flag gating for processing transitive file-level #: directives in file-based programs, aligning implementation, tests, and docs with the new default behavior.
Changes:
- Stop checking
ExperimentalFileBasedProgramEnableTransitiveDirectiveswhen validating directives (transitive directives always allowed). - Update
dotnet run filetests to no longer set the transitive-directives flag and remove the flag-specific test. - Remove the flag constant from the FileBasedPrograms internal API surface and update documentation accordingly.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| test/dotnet.Tests/CommandTests/Run/RunFileTests.cs | Removes transitive-directive flag setup and deletes the test that asserted the flag gating behavior. |
| src/Microsoft.DotNet.ProjectTools/VirtualProjectBuilder.cs | Removes the runtime check that required the transitive-directives flag for non-entry-point directives. |
| src/Cli/Microsoft.DotNet.FileBasedPrograms/InternalAPI.Unshipped.txt | Drops the internal API entry for the removed flag constant. |
| src/Cli/Microsoft.DotNet.FileBasedPrograms/FileLevelDirectiveHelpers.cs | Removes the transitive-directives flag constant from CSharpDirective.IncludeOrExclude. |
| documentation/general/dotnet-run-file.md | Removes documentation that stated transitive directives were gated behind a feature flag. |
|
Are we going to get this into 10.0.300 as well? |
|
IIRC, code complete of 10.0.3xx was yesterday. Also the IDE integration is probably not even released yet. |
|
We should check on the code complete status and if there's a process for getting changes in still. On the IDE side they release far more often and the experience in the insiders and pre-release versions is already good and we can do follow ups to tweak the experience as needed. Is the opt-in flag for transitive directives removed for .NET 11 already? |
No, but this PR will flow there once merged. |
Follow up on #53775 (comment).