Closed ChrisBr closed 5 years ago
Originally, jets built it in PROJECT/tmp
, but moved it to /tmp/jets/PROJECT
because the build artifacts would show up when searching for code, which was too noisy. It wasn't as pleasant to search for code and then would end up deleting tmp
. But then we would lose build cache, which was also not pleasant.
Would prefer to keep the build process in /tmp
.
Got an idea to fix this ruby-version issue though. As part of the build process we can copy the .ruby-version
file to /tmp/jets/PROJECT/.ruby-version
. So if we cd into /tmp/jets/PROJECT
the ruby version manager will switch to the same version of ruby.
At the /tmp
level it'll use the ~/.ruby-version
in the home folder still. So we can control it with ~/.ruby-version
in that case.
Will take a PR for this. If not, will take a look at it in time.
Originally, jets built it in PROJECT/tmp, but moved it to /tmp/jets/PROJECT because the build artifacts would show up when searching for code, which was too noisy. It wasn't as pleasant to search for code and then would end up deleting tmp. But then we would lose build cache, which was also not pleasant.
Hmm, isn't that anything which should get fixed on editor level?
Got an idea to fix this ruby-version issue though. As part of the build process we can copy the .ruby-version file to /tmp/jets/PROJECT/.ruby-version. So if we cd into /tmp/jets/PROJECT the ruby version manager will switch to the same version of ruby.
Yeah, that's also an solution which might be easier as well. However, still think that the build process should be in the project directory or at least configurable.
At the /tmp level it'll use the ~/.ruby-version in the home folder still. So we can control it with ~/.ruby-version in that case.
Yeah, that's how I eventually worked around it...
Will take a PR for this. If not, will take a look at it in time.
I will have a look at it.
RE: Hmm, isn't that anything which should get fixed on editor level?
Feel like users would have to take an unnecessary step of configuring their editor to ignore the search path. Some editors don’t support ignoring search paths as a feature also. 🤔
RE: Yeah, that's also an solution which might be easier as well. However, still think that the build process should be in the project directory or at least configurable.
Maybe. Unsure if it’s worth it to make it configurable at this time. If it’s configurable, then the default build root would be within /tmp. 🧐
RE: I will have a look at it.
👍
Checklist
jets upgrade
command that makes this a simple task. There's also an Upgrading Guide: http://rubyonjets.com/docs/upgrading/My Environment
Expected Behaviour
Jets build command uses
#{Jets.root.join('tmp')
instead of/tmp
directory. When using a different Ruby version (which is likely because jets does not support latest Ruby version so far), the project Ruby version does not match Ruby version in/tmp
. This can cause several issues like different bundler version and missing system libraries. Build directory should use the same Ruby version as the development directory.Current Behavior
Build directory is
/tmp
.Code Sample
See the following example, when having a
.ruby-version
file, having a nested foldertmp
rbenv will keep the same Ruby version, however, switching totmp
it will use the global system Ruby version which most likely will vary.