Comments (9)
It does look like Mint saves the executable to /usr/local/bin but the PATH environment variable for Xcode only seems to include:
export PATH="/Applications/Xcode-13.3.1.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
Is there an extra step typically required to move the binary to a good location? Has this changed between Xcode versions?
from swift-bundler.
Confirming the above, it does look like the PATH env var is what's ultimately causing problems here.
I've updated the Post Action script to include this at the start:
PATH=${PATH}:/usr/local/bin
This does seem to allow Xcode to find the executable and work as expected.
So I suppose the question here is now:
- Should this workaround be added to the project?
- Is the location where Mint installs the executable configurable?
- Do we need to update any documentation?
I am of course happy to raise a PR if somebody can share some guidance on what the expected route is for a user
//edit
Full Post Action script for the sake of clarity, only thing altered is the new line before the swift-bundler command.
PATH=${PATH}:/usr/local/bin
swift-bundler bundle HelloWorld -d ${WORKSPACE_PATH}/../../../ --products-directory ${BUILT_PRODUCTS_DIR} -o '/Users/sherlock/Library/Application Support/dev.stackotter.swift-bundler/build' --skip-build --built-with-xcode
from swift-bundler.
Have checked and my Mint version is v0.16.0 which is not the latest version, according to the changelog they have tweaked where packages are installed which may be the root cause of this problem.
I'm going to update now and try again to see if it does indeed fix the issue.
from swift-bundler.
Confirmed: updating to v0.17.0 of Mint does not fix this issue without doing the workaround above (though this time it needs to be $HOME/.mint/bin
)
from swift-bundler.
Thanks for notifying me of this issue! I fixed this exact issue a while ago but the fix meant that the binary had to be installed at a certain location, so I removed the fix and the issue didn't happen anymore. So I assumed that the latest version of Xcode had fixed this issue. It seems like I was incorrect.
When I look at my PATH
variable in Xcode it seems to be the same as in Terminal, I wonder why yours isn't.
Which rc/env file adds mint to your PATH
? You can check with grep -r "\.mint" .*{env,rc}
. For me, it's added in .zshenv
from swift-bundler.
export PATH=$PATH:$HOME/.mint/bin
is within my .zshrc
file
edit://
Seems to be some interesting patches here: https://stackoverflow.com/questions/932424/where-is-path-set-in-xcode
but none of this seems apparent where other users are able to get started without this, curious what's different here 🤔
from swift-bundler.
Interesting that Xcode seems to load zshenv but not zshrc. I think I have a good solution that shouldn't rely on the location of the binary. I'll add lines to source all of the zsh files that aren't sourced when zsh is running a script. That way, if it runs in terminal, it should run in xcode
from swift-bundler.
Happy to Guinea Pig any proposed changes! I won't try and more fixes to make sure it works as expected.
Thanks for the help, I understand this is a bit of a weird one and is clearly not impacting everyone.
from swift-bundler.
This should be fixed in v2.0.3
from swift-bundler.
Related Issues (19)
- Init Naming Conflicts HOT 3
- Create string descriptions for all errors HOT 1
- Add option to remove log noise when using Xcode
- Fix log glitches when building HOT 1
- Support sandboxing and code signing HOT 1
- Improve configuration deserialisation error messages HOT 3
- Fix issue related to `-d` option and dynamic libraries HOT 1
- iOS build support HOT 3
- Provide JSON Schema for Configuration HOT 5
- Support for bundling XPC Services HOT 4
- Implement debugging mode
- fails to install HOT 6
- Fatal crashes have no useful output HOT 1
- Add `--version` HOT 2
- Save git commit hash of the project HOT 1
- Linux build support HOT 2
- Support Asset Catalogs HOT 1
- Create a public API that other tools can use
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from swift-bundler.