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

Add option to restrict gems from Gemfile (deps only) #1087

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

tonobo
Copy link

@tonobo tonobo commented Apr 21, 2017

Description

It will add an new feature which basically depends on --gemfile option.
The new --gemfile-deps option will only render specified Gems, instead of rendering the whole Gemfile.lock (automatically resolved dependencies) as --gemfile does.

Completed Tasks

  • I have read the Contributing Guide.
  • The pull request is complete (implemented / written).
  • Git commits have been cleaned up (squash WIP / revert commits).
  • I wrote tests and ran bundle exec rake locally (if code is attached to PR).

@coveralls
Copy link

coveralls commented Apr 21, 2017

Coverage Status

Coverage increased (+0.009%) to 93.527% when pulling c90bbaa on dopykuh:master into 9f14dbf on lsegal:master.

@lsegal
Copy link
Owner

lsegal commented Apr 21, 2017

I still don't see a problem statement here. Why is this needed?

@tonobo
Copy link
Author

tonobo commented Apr 21, 2017

I have a lot of gems which i will automatically generate documentation for, but i don't care about the resolved depencencies. I just want a list of my libaries not tens of others.

@lsegal
Copy link
Owner

lsegal commented Apr 23, 2017

I understand this now. I'd prefer a better approach than adding yet another --gemfile* argument that does mostly the same thing as the other with an unclear distinction.

Calling them "dependencies" is not clear. Transitive dependencies are also dependencies, so saying "only dependencies" should not mean anything different. "Ignore transitive dependencies" would be more clear, but that's obviously wordy.

I'd actually be open to changing the behavior of --gemfile slightly to pick direct dependencies if Gemfile is selected, and include all dependencies if the Gemfile.lock is selected. This is technically a breaking change, though I believe this is the behavior that most users will want anyway, so breaking is relative. One could call the inclusion of transitive dependencies a bug in its own right.

Doing that would definitely mean waiting on any feedback though, and some investigation to see how many people might be affected.

@lsegal lsegal force-pushed the master branch 2 times, most recently from 44c07a8 to 112a890 Compare January 7, 2020 04:04
@lsegal lsegal closed this Jun 20, 2020
@lsegal lsegal reopened this Jun 20, 2020
@lsegal lsegal changed the base branch from master to main June 20, 2020 18:12
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

Successfully merging this pull request may close these issues.

3 participants