Skip to content
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

Mercury.framework/Modules' does not exist or is not readable #1103

Open
KaBlaize opened this issue Oct 17, 2022 · 2 comments
Open

Mercury.framework/Modules' does not exist or is not readable #1103

KaBlaize opened this issue Oct 17, 2022 · 2 comments

Comments

@KaBlaize
Copy link

KaBlaize commented Oct 17, 2022

The problem

My config

sources:
 - "./"
templates:
 - "BTUtils/BTUtils/CodeGenerationTemplates"
output:
 "BTUtils/BTUtils/Generated/Sourcery.generated.swift"

The output of sourcery:

As I found out macOS (12.6) has a broken symbolic link on the sys (but not only on my Macs, my college also got into the same error):

🌱 Finding latest version of Sourcery
🌱 Running sourcery 1.9.0...
Using configuration file at '.sourcery.yml'
error: '/Library/Apple/System/Library/PrivateFrameworks/Mercury.framework/Modules' does not exist or is not readable.
'/Library/Apple/System/Library/PrivateFrameworks/Mercury.framework/Modules' does not exist or is not readable.
shell returned 1

A short investigation:

file /Library/Apple/System/Library/PrivateFrameworks/Mercury.framework/Modules
/Library/Apple/System/Library/PrivateFrameworks/Mercury.framework/Modules: broken symbolic link to Versions/Current/Modules

 ls -l /Library/Apple/System/Library/PrivateFrameworks/Mercury.framework/Versions 
total 0
drwxr-xr-x  5 root  wheel  160 Aug 15 21:35 A
lrwxr-xr-x  1 root  wheel    1 Sep 21 08:36 Current -> A

ls -l /Library/Apple/System/Library/PrivateFrameworks/Mercury.framework/Versions/A 
total 1752
-rwxr-xr-x  1 root  wheel  2210384 Aug 15 21:35 Mercury
drwxr-xr-x  4 root  wheel      128 Jun  2 06:22 Resources
drwxr-xr-x  3 root  wheel       96 Jun  2 06:22 _CodeSignature

Does someone know about a workaround?

Versions

 swift --version
swift-driver version: 1.62.8 Apple Swift version 5.7 (swiftlang-5.7.0.127.4 clang-1400.0.29.50)
Target: x86_64-apple-macosx12.0

Xcode: Version 14.0.1 (14A400)

@KaBlaize
Copy link
Author

Solution found but the issue is weird.
if I replace the following in my config:

sources:
 - "./"

to

sources:
 - "."

All works as expected.

@acevif
Copy link

acevif commented Apr 12, 2023

I've got a similar error but KaBlaize's solution fixed it.

@KaBlaize Thanks.

Environment:

Sourcery: 2.0.2
macOS: 13.3.1(22E261)

$ swift --version
swift-driver version: 1.75.2 Apple Swift version 5.8 (swiftlang-5.8.0.124.2 clang-1403.0.22.11.100)
Target: x86_64-apple-macosx13.0

The output of Sourcery:

$ mint run -m ../Mintfile Sourcery sourcery -v
Using configuration file at '.sourcery.yml'
Resolving configurations took 84.38642203807831
error: '/Library/Apple/System/Library/PrivateFrameworks/Mercury.framework/Modules' does not exist or is not readable.
'/Library/Apple/System/Library/PrivateFrameworks/Mercury.framework/Modules' does not exist or is not readable.%

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants