Coder Social home page Coder Social logo

Comments (9)

Sherlouk avatar Sherlouk commented on July 3, 2024

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.

Sherlouk avatar Sherlouk commented on July 3, 2024

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:

  1. Should this workaround be added to the project?
  2. Is the location where Mint installs the executable configurable?
  3. 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 🙂 Thanks!

//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.

Sherlouk avatar Sherlouk commented on July 3, 2024

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.

Sherlouk avatar Sherlouk commented on July 3, 2024

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.

stackotter avatar stackotter commented on July 3, 2024

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.

Sherlouk avatar Sherlouk commented on July 3, 2024

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.

stackotter avatar stackotter commented on July 3, 2024

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.

Sherlouk avatar Sherlouk commented on July 3, 2024

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.

stackotter avatar stackotter commented on July 3, 2024

This should be fixed in v2.0.3

from swift-bundler.

Related Issues (19)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.