-
Notifications
You must be signed in to change notification settings - Fork 193
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
[SR-11900] 'swift help' doesn't work #1249
Comments
Comment by Jhonny Bill Mena (JIRA) Hi, I have been trying to tackle this, but I have problems building the project. I followed the instructions in the [getting started guide|https://github.com/apple/swift#getting-started] but:
It fails with: ** BUILD FAILED **
The following build commands failed: CompileC
../swift-source/build/Xcode-RelWithDebInfoAssert/swift-macosx-x86_64/lib/Sema/Swift.build/RelWithDebInfo/swiftSema.build/Objects-normal/x86_64/TypeCheckAttr.o lib/Sema/TypeCheckAttr.cpp normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
utils/build-script: fatal error: command terminated with a non-zero exit status 65, aborting
But this time it throws the following error: ../swift-source/swift/lib/Sema/TypeCheckAttr.cpp:3558:5: error: non-void function 'typeCheckDerivativeAttr' should return a value [-Wreturn-type]
return;
^
1 error generated.
[584/1771][ 32%][395.978s] Building CXX object lib/Sema/CMakeFiles/swiftSema.dir/TypeCheckDecl.cpp.o
ninja: build stopped: subcommand failed.
utils/build-script: fatal error: command terminated with a non-zero exit status 1, aborting Environment:
Thanks in advance! |
JhonnyBillM (JIRA User) Thanks for taking a look at this bug! The TypeCheckAttr.cpp error was fixed in PR #28897. If you run a "git pull" in your "swift" folder, you should get the fix for it as long as you're on master. (Pulling only the "swift" folder will keep you from having to rebuild LLVM and clang; if you used "utils/update-checkout", you'd probably have to start the build from scratch.) The Xcode build also stopped while trying to build TypeCheckAttr.cpp, so I'm guessing it hit the same issue and the diagnostic was just buried earlier in the log. If you need any more help you can keep posting here, or you can message me on Swift Forums or Twitter. My username in both places is "brentdax". |
Comment by Jhonny Bill Mena (JIRA) Worked! Thank you brentdax (JIRA User) . By the way, what do you think fits better for this case, adding a new |
Comment by Matei Oprea (JIRA) brentdax (JIRA User) is this still open? I might have an implementation for it, but after compiling Swift, it didn't output "swift-build" or "swift-run" executables in swift-macosx-x86_64/bin/*. Any recommendations on how to take it from here? |
owenvoorhees (JIRA User) I see that you added a swift-help tool to the new driver. Should this bug be closed? |
Comment by Owen Voorhees (JIRA) brentdax (JIRA User) Right now swift-driver's `swift-help` has pretty limited functionality and only works for driver options (so for example "swift help package" doesn't work). I think we can probably repurpose this issue to track at least handling subcommands properly, since that's an important use case. |
|
I think we should let the driver folks decide whether this is resolved. @artemcm Could you transfer this issue to the swift-driver repo? |
Additional Detail from JIRA
md5: 1ee0e9c459854e8821d1936d514204b9
Issue Description:
To implement command-line features like "swift build", the Swift driver treats
swift <some name>
as though you had writtenswift-<some name>
. However, it does not respond sensibly toswift help package/build/test/etc
. It would be better if it treatedswift help <some name>
as though you had writtenswift <some name> --help
, andswift help <other args>
as though you had writtenswift --help <other args>
. (Pretty much all Swift executables handle--help
; a few don't seem to handle-help
.)This can be implemented in swift-driver's swift-help executable, which is run if the user types "swift help <args>". The implementation of the tool can be found in the swift-driver repository: https://github.com/apple/swift-driver
The text was updated successfully, but these errors were encountered: