Skip to content

Allow using /main with top-level statements - #79577

Merged
jjonescz merged 2 commits into
dotnet:mainfrom
jjonescz:main-tls
Aug 11, 2025
Merged

jjonescz merged 2 commits into
dotnet:mainfrom
jjonescz:main-tls

Conversation

@jjonescz

@jjonescz jjonescz commented Jul 24, 2025 •

Copy link
Copy Markdown
Member

@jjonescz
jjonescz marked this pull request as ready for review July 24, 2025 17:49
@jjonescz
jjonescz requested a review from a team as a code owner July 24, 2025 17:49

@RikkiGibson RikkiGibson left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the implementation itself LGTM. Still working on understanding the scenario.

@jjonescz
jjonescz requested a review from a team August 6, 2025 10:40

comp.VerifyEmitDiagnostics(
// error CS8804: Cannot specify /main if there is a compilation unit with top-level statements.
Diagnostic(ErrorCode.ERR_SimpleProgramDisallowsMainType).WithLocation(1, 1),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's verify execution for scenarios that no longer error

@jcouv jcouv self-assigned this Aug 7, 2025

@jcouv jcouv left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM Thanks (commit 1)

@jjonescz
jjonescz enabled auto-merge (squash) August 11, 2025 09:44
@jjonescz
jjonescz merged commit 3f1b9b0 into dotnet:main Aug 11, 2025
@jjonescz
jjonescz deleted the main-tls branch August 11, 2025 10:34
@dotnet-policy-service dotnet-policy-service Bot added this to the Next milestone Aug 11, 2025
333fred added a commit to 333fred/roslyn that referenced this pull request Aug 13, 2025
* upstream/main: (87 commits)
  Fix ref safety of implicit calls that might capture refs in the receiver (dotnet#76657)
  Update dependencies from https://github.com/dotnet/dotnet build 278961 Updated Dependencies: System.CommandLine (Version 2.0.0-rc.1.25410.101 -> 2.0.0-rc.1.25411.109)
  Update checklist for adding new language version (dotnet#79881)
  Skip ValidateAllOptions flaky test
  Don't try to load file based projects unless we get a .cs file (dotnet#79844)
  Update package restore error message.
  [main] Source code updates from dotnet/dotnet (dotnet#79862)
  Fix failure to report integration test results when retrying Also fix newly failing tests
  feedback
  More semantic update changes (dotnet#79828)
  Fix flow analysis of extern local functions (dotnet#79741)
  Allow using `/main` with top-level statements (dotnet#79577)
  Delete
  Async
  JTF.run
  Delete comment
  Delete code
  Cancel in flight work
  Simplify
  Fix race condition
  ...
@RikkiGibson RikkiGibson modified the milestones: Next, 18.0 P1 Aug 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants