Comments (7)
We'd need to eventually import verl, but the library is gonna need patches to fit along with rebar3 as well. I've just been working on other side projects rather than supporting this unfortunately.
from erlware_commons.
First, is this a bug in hex as well? Should it not be accepting versions like that (it is supposed to enforce semver format)? Either way we need to support this in ec_semver
but would want to also notify the hex project.
from erlware_commons.
From my reading of the spec, a semantic version of 0.7.0-vendored-xhttp
is valid because the "pre-release identifier" part (in this example, vendored-xhttp
) is allowed to contain hyphens. I agree that hex is responsible for enforcing valid semantic version strings, but in this case I don't believe it's wrong to be accepting semantic versions like this one.
Many thanks for the quick response!
from erlware_commons.
Regarding this, do we want to import verl
, or find some such similar solution?
from erlware_commons.
Let me know if I can help. You can probably describe 2 or 3 things that are necessary and I'd try to find time to tackle them.
from erlware_commons.
I am running well under erlware_commons v1.6.0
([email protected])2> ec_semver:parse(<<"0.7.0-vendored-xhttp">>).
{{0,7,0},{[<<"vendored-xhttp">>],[]}}
from erlware_commons.
However, a few [hex] packages contain hyphens in the "pre-release identifer" portion of the semantic version, e.g. https://hex.pm/packages/xclient/0.7.0-vendored-xhttp, and this breaks the parser:
7> ec_semver:parse(<<"0.7.0-vendored-xhttp">>). {<<"0.7.0-vendored-xhttp">>,{[],[]}}
I've found that simply changing
<<"[A-Za-z0-9]">>
to<<"[A-Za-z0-9-]">>
insrc/ec_semver_parser.erl
seems to address the problem, although I haven't reviewed the code sufficiently to say that this is the most appropriate fix.
@limeytexan, from what I see, 4e3b177 fixed the issue:
In 1.7.0, the example you proposed is correctly parsed:
8> ec_semver:parse(<<"0.7.0-vendored-xhttp">>).
{{0,7,0},{[<<"vendored-xhttp">>],[]}}
9> ec_file:md5sum(ec_semver:module_info(md5)).
"b4f8e531a6a10f0a83d655bf991c921e"
from erlware_commons.
Related Issues (20)
- Does not compile with newest rebar3 HOT 1
- Incorrect ISO 8601 formatting
- Hex.pm versioning does not seem to match tags
- build ec_plists.erl failed HOT 1
- Discrepancy between hex.pm vs. the COPYING file HOT 2
- please tag next version (0.23.0 ?) HOT 14
- ec_date:parse not parsing microseconds when timezone offset is given
- Git tag 1.0.5 missing? HOT 1
- ec_file:copy fails for not owned source file with OTP 21-rc2 HOT 9
- runmany_wrap doesn't actually call the passed function
- Warnings emitted on OTP 24 prevent Rebar 3 bootstrap HOT 1
- Badarg error while performing rebar cover HOT 1
- A new tag is needed by erlang/otp 24.0-rc1
- Request for Hex.pm publication HOT 5
- ec_cmd_log doesn't support unicode chars
- ec_date:format() incorrectly formating 'G' in the format parameter string
- The pattern <State, Color, 'true', Msg> can never match the type <_,99 | 103 | 109 | 114,'false',_> HOT 2
- Unknown function compile:forms/2 HOT 3
- Upcoming improvement tasks HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from erlware_commons.