We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
@main
It would be nice if swift-sh would support scripts that contain the new @main. Like:
@main struct MyTool: App { var body: some Scene { WindowGroup { Text("Hello World!") } } }
Suggested implementation:
@main[\t\n ]+struct
main.swift
Package.swift
// swift-tools-version:5.5 ... pkg.platforms = [ .macOS(.v11) ]
Another option might be to use the hashbang line to configure an explicit mode? Like:
#!/usr/bin/swift sh #@main
The text was updated successfully, but these errors were encountered:
I agree with your suggested approach.
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
It would be nice if swift-sh would support scripts that contain the new
@main
. Like:Suggested implementation:
@main
or maybe@main[\t\n ]+struct
if the script itself is not calledmain.swift
main.swift
but instead keep the original script name (like MyTool.swift)main.swift
@main
), and add this to thePackage.swift
:Another option might be to use the hashbang line to configure an explicit mode? Like:
The text was updated successfully, but these errors were encountered: