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

Hex improvements #1070

Merged
merged 1 commit into from
Feb 24, 2016
Merged

Hex improvements #1070

merged 1 commit into from
Feb 24, 2016

Conversation

Licenser
Copy link
Contributor

Add: ==, >=, >, < and <=

<<"== ", Vsn/binary>> ->
[{Dep, Vsn} | DepsListAcc];
<<"==", Vsn/binary>> ->
[{Dep, Vsn} | DepsListAcc];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These should ideally handle any number of spaces.

@ericmj
Copy link
Contributor

ericmj commented Feb 20, 2016

This should also handle and and or operators. They are both left associative and binds equally strong.

@Licenser
Copy link
Contributor Author

I'd like to keep and and or for later they start to get into a full 'grammar' this alone will solve most problems.

@tsloughter
Copy link
Collaborator

Agreed. @Licenser but this can't be merged as is, you ended up with a bunch of other commits in this.

@Licenser
Copy link
Contributor Author

I've added warnings when packages dependences can not be compiled so there are no quiet failures

@Licenser
Copy link
Contributor Author

@tsloughter you will make me rebase again will you?

Add more version constraints

Allow for any number of whitespaces after compairison opperator

Improve updating and error printing

Fix failing tests
rm_ws(R) ->
R.

valid_vsn(Vsn) ->
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we really need this? @ferd opinion?

@Licenser
Copy link
Contributor Author

@tsloughter regarding to @ericmj there can be no or as many spaces as people want in the requirements.

@ericmj
Copy link
Contributor

ericmj commented Feb 22, 2016

I'd like to keep and and or for later they start to get into a full 'grammar' this alone will solve most problems.

Okay. Checked today how many packages rely on this, currently there are 169 packages with and or or in them.

@Licenser
Copy link
Contributor Author

That is odd none of them showed up when updating the registry, with the latest patch all 'incompatible' package should have been printed (tests say it works :P), perhaps rebar pre-filters those since they are not rebar-buildable?

On a site node, does't and and or violate the premises of server? ~> should always work for properly sem-vered packages or am I missing something?

@ericmj
Copy link
Contributor

ericmj commented Feb 23, 2016

That is odd none of them showed up when updating the registry, with the latest patch all 'incompatible' package should have been printed (tests say it works :P), perhaps rebar pre-filters those since they are not rebar-buildable?

Yes, they would all be elixir packages because I think rebar currently only allows published dependencies with strict version requirements. But I think the plan is to allow less strict version requirements and also support elixir projects through plugins. You are right though, support for those operators are not currently needed.

On a site node, does't and and or violate the premises of server? ~> should always work for properly sem-vered packages or am I missing something?

~> should always work but the server also allows and and or. If you want to use a package that has defined its dependency version requirements with those operators it wouldn't work.

@tsloughter
Copy link
Collaborator

I'm accepting this. We'll obviously want refinements in the future.

tsloughter added a commit that referenced this pull request Feb 24, 2016
@tsloughter tsloughter merged commit b9f058a into erlang:master Feb 24, 2016
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