Skip to content

Conversation

@paracycle
Copy link
Contributor

So far, Gel has been using only the nearest value defined in a Gemfile for group, platforms and install_if options, disregarding any values supplied in surrounding contexts. However, Bundler actually merges all the values in all the contexts.

This PR is an initial naive attempt to resolve the behaviour difference between the two. It assumes that all such options are Array valued and it just blindly collects all the Array values together.

I would be grateful if I can get comments on the general direction and/or possible improvements on implementation and testing.

@matthewd
Copy link
Member

This behaviour seems very odd to me: given a platforms :mri do block, I'd expect any contained platforms: option to apply an intersection, not a union -- it seems weird for the default action to be that it breaks out of the surrounding block's scope. But I think we're obliged to follow Bundler, so it doesn't really matter what I think. 😊

Implementation looks good! Let's not use :rbx, just because I'd prefer to avoid any implication we might support it in the future. (And we'll probably start validating the list some point.) JRuby?

Does this logic apply to source too?

Base automatically changed from master to main January 16, 2021 11:41
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.

2 participants