You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
brentdax (JIRA User) pointed out that:
"When you run
swiftmyscript.swift
, arguments after the filename become arguments to the script, available in CommandLine.arguments, rather than arguments to Swift." This makes sense, but can pretty easily lead to surprising behavior.
It would be nice if when processing arguments, swift could look for potentially valid swift arguments after the filename, and provide some kind of warning. We'd probably want to avoid warning on some of the single letter flags that might be commonly used by scripts though, so this might be tricky.
The text was updated successfully, but these errors were encountered:
Additional Detail from JIRA
md5: 6af0f5e2968b62987a7e90117a51066b
Issue Description:
https://forums.swift.org/t/import-compiler-builtins/27869/10 for context
brentdax (JIRA User) pointed out that:
"When you run
, arguments after the filename become arguments to the script, available in CommandLine.arguments, rather than arguments to Swift." This makes sense, but can pretty easily lead to surprising behavior.
It would be nice if when processing arguments, swift could look for potentially valid swift arguments after the filename, and provide some kind of warning. We'd probably want to avoid warning on some of the single letter flags that might be commonly used by scripts though, so this might be tricky.
The text was updated successfully, but these errors were encountered: