-
-
Notifications
You must be signed in to change notification settings - Fork 238
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
Allow configuration of vendor path #136
Comments
Context: prawnpdf/prawn#1190 I think FWIW, TravisCI also uses While I understand adding new files under the repository root might be undesirable, it also seems a very common and accepted practice. node.js has So I think in general it's valuable to support I understand the request, but I question the need, is there an actual issue with having gems under RuboCop can be a little bit confusing, but I argue that's due to a bug of RuboCop (rubocop/rubocop#9325). inherit_mode:
merge:
- Exclude (https://docs.rubocop.org/rubocop/0.88/configuration.html#merging-arrays-using-inherit_mode) Related: #131 (comment) (cc @artplan1). Another issue if we would implement this is with self-hosted runners. On those runners, only the working directory is cleaned between builds. Which means if the Bundler path was set to e.g. |
I filed an issue to RuboCop because I think merging |
The issue currently arises from RuboCop. However, I don't believe it is strictly a RuboCop issue. Pretty much any tool can be confused by extraneous files. For example, RSpec can easily pick up specs vendored specs with non-default spec pattern. Custom operations like packaging might not expect those extra files as well. Those operation might result in incorrect artifacts. In addition, in the context of CI (which I believe it the primary use of this action) |
That's fairly rare though, isn't it? I guess 99% users put specs under
Packaging should always use an explicit include list (or IDE files (and also directories, e.g.,
The
So the deployment flag is actually recommended for CI, according to Bundler docs. It also seems a common practice. I think currently adding the complexity (harder to test, makes the key more complex, harder to reason where the files are and how long they are preserved, if they might collide with something else, etc) and risk (related to self-hosted runners as mentioned above) of a custom Bundler path is not worth it for what seems to be mostly personal preferences. I'd like to suggest merging prawnpdf/prawn#1190 and reconsider if there is any issue. Of course, you can also decline it, but be aware that manually caching gems is typically incorrect (https://github.com/ruby/setup-ruby#caching-bundle-install-manually, prawnpdf/prawn#1190 (comment)). |
It is but I'm not arguing for changing the defaults but adding some flexibility to accommodate those rare cases. I totally understand unwillingness to make things more complex than they need to be. After all, this is your project. To me it doesn't look like it would complicate things a lot. After all the vendor path is already in a variable. It would only take exposing an option for that variable to read from. Of course, I'm not aware of all the nuances of the action, one of which you've mentioned above. Feel free to close this issue if you believe the feature doesn't fit the scope of the project. |
I'm not so keen to add an extra input for this, I'd rather keep inputs to the strict minimum. |
I think allowing to customize the Bundler path would be a source of bugs and a lot of maintenance overhead, so I'm not willing to allow changing it currently. |
When installing gems using bundler on a CI system the gems end up in the vendor/bundle folder pr default and these files are not supposed to be included in the package, so they should be skipped. Also locally if installing gems in vendor/ I get a "Too many open files" error as each AppFile is opened upon instantiation. Some systems will not the path be changed: ruby/setup-ruby#136
When installing gems using bundler on a CI system the gems end up in the vendor/bundle folder pr default and these files are not supposed to be included in the package, so they should be skipped. Also locally if installing gems in vendor/ I get a "Too many open files" error as each AppFile is opened upon instantiation. Some systems will not the path be changed: ruby/setup-ruby#136
GitHub Action ruby/setup-ruby does not allow customization of the vendor path¹ so just exclude the hard-coded `vendor/` path in the config. ¹ ruby/setup-ruby#136
Currently
bundler-cache
option implies that gems will be installed invendor/bundle
in the source tree root. This is undesirable as it might interfere with tooling setup that can mistake vendored gems source for the project source.Please allow configuration of the vendor path or at least provide an option to install gems outside of the project source tree.
The text was updated successfully, but these errors were encountered: