-
Notifications
You must be signed in to change notification settings - Fork 98
Fatal error: could not load resource bundle #196
Comments
Getting the same thing as well. Installed beta-5 via homebrew. |
Really sorry for the inconvenience. This is a consequence of unexpected behavior in Swift package resources ( |
@vishcshah @MattKiazyk I want to add some end-to-end testing before doing any more releases, which will take a few days. In the meantime, please downgrade to 1.0.0-beta.4 or reinstall manually from the latest head of master. If you're running this via CI, the |
@vishcshah @MattKiazyk @MaxDesiatov I think I figured out what was causing this release to fail. The good news is that the problem appears to be how it's distributed with Homebrew (rather than the project itself), so updating the formula should fix this release. Could you please try reinstalling with the following commands?
|
After reinstalling the formula with the steps you've listed I no longer get #197. But now I get the exact same error as the OP:
|
@MaxDesiatov Thanks. I didn't expect this to fix #197 (I'm working on a solution to that now). Could you share the output when you run the following commands?
|
You mean |
Yep. (Huh, I could've sworn that was a built-in...) Thanks for sharing this, @MaxDesiatov. This is indeed what I was going for with the formula:
My hope was that the symlink would allow Edit: I'm able to reproduce locally now. |
@MaxDesiatov Figured it out. Turns out what I wanted wasn't an alias / symbolic link, but instead a shim. I updated the formula accordingly. I just reinstalled locally and it seems to be working as expected. Feel free to give it a go and let me know how it's working for you. |
@MattKiazyk @vishcshah This should now be fixed with the latest Homebrew formula. Please try reinstalling with the following commands to verify the fix:
|
The installation now fails for me with this error:
|
Would it make sense to create another end-to-end test that verifies that |
Sorry, that's me debugging something else related to #197. It's baffling and endlessly frustrating to me that there doesn't appear to be a way to try out Homebrew formulas locally. If you untap/retap and reinstall, that should work again.
Indeed it would. That should be a separate action workflow that runs on a cron schedule, since it depends on so many different factors (swift-doc, the formula, Homebrew itself, Xcode, macOS). |
You can pass a path to a formula on your local storage like |
🤦 I swear this wasn't working when I tried that yesterday (I have the Terminal logs to prove it!). Anyway, very glad to have that option available. |
Thanks to Homebrew, there's a lot for all of us to learn 😄 |
@MaxDesiatov I was pleasantly surprised to see that Homebrew has some sophisticated tooling built for doing this kind of thing — specifically, https://github.com/Homebrew/ruby-macho. No shelling out to Here's the relevant change in the formula (more or less): macho = MachO.open(buildpath/"release/swift-doc")
if (toolchain = macho.rpaths.find { |path| path.include?(".xctoolchain") })
cp Dir["#{toolchain}/*.dylib"], lib, verbose: true
macho.change_rpath toolchain, lib
macho.write!
end That, in theory, should address #197 Once that's working, the last thing I want to do is add a bottle (pre-built binary), and then I'll be done futzing with that for a while. |
This will break on Apple Silicon I'm afraid 😧 |
😂 According to the Apple event countdown timer, we have another 6 days and 6 hours until we need to worry about that. #yolo |
I've just tried the updated formula, it works for me. Thanks for the fix @mattt! |
Excellent. Thank you for verifying. Botching a release feels bad, but I really like where we are now. I'm just finishing up a GitHub Action to automate this going forward. I also filed #202 to track additional work on end-to-end testing. @vishcshah Please let me know if you're still having this problem, and I'd be happy to reopen and help troubleshoot it with you. |
@mattt I will try in 2 or 3 days, will let you know about the results. |
While generating format html with the current latest version getting Illegal instruction: 4.
Using latest Xcode Version 12.0.1 (12A7300)
swift-doc version: 1.0.0-beta.5
this is my command:
swift-doc generate somePath --module-name testing --output public --format html
Error:
Fatal error: could not load resource bundle: /usr/local/bin/swift-doc_swift-doc.bundle: file swift_doc/resource_bundle_accessor.swift, line 7
Illegal instruction: 4
Let me know if I am missing something.
The text was updated successfully, but these errors were encountered: