Giter VIP home page Giter VIP logo

vmlib's People

Contributors

nirenjan avatar

Watchers

 avatar  avatar

vmlib's Issues

Build metadata should store all identifiers as strings

According to SemVer 2.0.0, leading zeroes are acceptable in build identifiers. However, current version of vmlib strips any leading zeroes and stores the identifiers as numbers (if the identifier has only digits).

Format can break with multiple type specifiers of the same class

There is nothing in format to prevent the user from passing in a string such as %3M.%2m.%p%M

In this case, the format code assumes that there is only 1 %(\d*)M element, and uses that to determine the format for the entire string. So while the user may be expecting 001.02.3.1, he would actually get 001.02.3.001 (note the final 00 padding).

vmlib wrapper shows full path to binary

The vmlib wrapper script serves to automate some of the common tasks implemented by the VMLib module. The issue is that if it prints out any help, the entire path is printed out, such as the line below

Usage: /Users/nirenjan/.rvm/gems/ruby-1.9.3-p429/bin/vmlib <command> [arguments]

What we would expect is to strip out the path and simply print

Usage: vmlib <command> [arguments]

As a result of this bug, you can see the full path being printed everywhere, and it throws off the formatting.

Setting the prerelease field should throw an error if a numeric identifier has leading zeros.

Based on SemVer v2.0.0, prerelease identifiers that are numeric MUST NOT contain leading zeroes. Currently, vmlib accepts a prerelease identifier of the form 01.002.0003, but stores it as 1.2.3 - which is compliant with the specification.

However, there is a corner case if the user expects to retrieve the number exactly as stored. There are three possible ways to address this.

  1. Ignore leading zeroes in numeric identifiers. They will be stored as is, if and only if, there are any alphabetic characters or hyphens in the identifier. This corresponds to current behaviour.
  2. If an identifier has leading zeroes, then treat it as a string.
  3. Throw an error if the user attempts to enter a numeric identifier with leading zeroes.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.