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

AckGen not found... #6

Open
JulesMoorhouse opened this issue May 14, 2022 · 6 comments
Open

AckGen not found... #6

JulesMoorhouse opened this issue May 14, 2022 · 6 comments

Comments

@JulesMoorhouse
Copy link

Hi,

I'm constantly getting the ...
AckGen not found. Please install the package via SPM (https://github.com/MartinP7r/AckGen#installation)
... message

I've had a bit of look around and can't find the folder it's looking for.

I've had this issue with Xcode 13.3, and now 13.4.

Any ideas ?

Thanks,

Jules.

@MartinP7r
Copy link
Owner

Sorry, I haven't had a chance to look at that. Maybe I get to it in the coming days.
Are you running this from a ScriptPhase script as described in the readme?

@MartinP7r
Copy link
Owner

@JulesMoorhouse are you by any chance using something other than SPM to install this package?
If so the package will not reside in DIR=$PROJECT_TEMP_DIR/../../../SourcePackages/checkouts/AckGen, so you would need to change the path in your RunScript accordingly.

@MartinP7r
Copy link
Owner

@JulesMoorhouse I'll close this for now. Please feel free to reopen if the issue still happens. Please let me know.

PS:

I've had a bit of look around and can't find the folder it's looking for.

You can find the folder it's looking for by printing $PROJECT_TEMP_DIR from your run script and investigate from there.

@MartinP7r MartinP7r closed this as not planned Won't fix, can't repro, duplicate, stale Dec 6, 2022
@beekeweerts
Copy link

I had the same issue with Xcode 14.3.1. The data path has probably changed. The problem can be easily solved by replacing the path from the readme with this one:
DIR=$PROJECT_TEMP_DIR/../../../../../../SourcePackages/checkouts/AckGen

@MartinP7r MartinP7r reopened this Aug 19, 2023
@MartinP7r
Copy link
Owner

@beekeweerts Hallöchen!

Thanks for sharing.
I just tried with Xcode 14.3.1 and it works normally for me, so I'm thinking there might we some difference between our Xcode environments.

As mentioned above, for investigation. Could you print $PROJECT_TEMP_DIR and share the output? Since mine looks like below, yours must be at least 3 folders deeper.

/Users/[USERNAME]/Library/Developer/Xcode/DerivedData/[APPNAME]-fkztgoovyeymvbaqsqyonvjdlabf/Build/Intermediates.noindex/JDict.build

Also, if you are able to share a minimum reproducible example project, that would be helpful.

@beekeweerts
Copy link

@MartinP7r Moin!

My path looks like this:
/Users/[USERNAME]/Library/Developer/Xcode/DerivedData/[APPNAME]-fhcoiujjikncqmfokafxfpjlodgs/Build/Intermediates.noindex/ArchiveIntermediates/[TARGET-NAME]/IntermediateBuildFilesPath/[APP-NAME].build

I'm not really sure why that differs in our environments. Some run script like this could help to address this issue:

current_dir=$PROJECT_TEMP_DIR
target="SourcePackages/checkouts/AckGen"
while [ "$current_dir" != "/" ]; do
    # Check if the target path exists in the current directory
    if [ -e "$current_dir/$target" ]; then
        DIR="$current_dir/$target"
        exit 0
    else
        # Move one directory up
        current_dir=$(dirname "$current_dir")
    fi
done

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

3 participants