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

Require space in ranges #67

Merged
merged 2 commits into from
Apr 3, 2018

Conversation

carolynvs
Copy link

2-3 could be interpreted as 2.0.0 - 3.0.0 OR 2.0.0-3 where 3 is the pre-release segment. In order to disambiguate between the two, require that ranges have a space around the range separator. This is the current behavior on v1.

2-3 is interpreted as 2.0.0-3
2 - 3 is interpreted as 2.0.0 - 3.0.0

I've also added tests to verify that this change resolves #59 as well. After putting this in, no further code changes were necessary. 🎉

2-3 could be interpreted as 2.0.0 - 3.0.0 OR
2.0.0-3 where 3 is the pre-release segment. In order to disambiguate
between the two, require that ranges have a space around the range
separator.

2-3 is interpreted as 2.0.0-3
2 - 3 is interpreted as 2.0.0 - 3.0.0
@carolynvs carolynvs force-pushed the require-space-in-ranges branch 2 times, most recently from 3a3bd92 to 2a63d2a Compare April 2, 2018 16:37
Add tests to verify that versions with a dash in the prerelease tag,
e.g. 1.0.0-12-abc123 isn't converted to a range
@@ -42,7 +42,7 @@ func init() {
cvRegex))

constraintRangeRegex = regexp.MustCompile(fmt.Sprintf(
`\s*(%s)\s*-\s*(%s)\s*`,
`\s*(%s)\s* - \s*(%s)\s*`,
Copy link
Member

Choose a reason for hiding this comment

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

My only nit would be that \s* and \s* could be replaced with \s+. The * is for zero or more while the + is for one or more.

@mattfarina mattfarina merged commit 24642bd into Masterminds:2.x Apr 3, 2018
halstead pushed a commit to openembedded/openembedded-core that referenced this pull request Aug 30, 2018
NEW FEATURES:

- Add CI tests against go1.10. Drop support for go1.8. (#1620).
- Added install.sh script. (#1533).
- List out of date projects in dep status (#1553).
- Enabled opt-in persistent caching via DEPCACHEAGE env var. (#1711).
- Allow DEPPROJECTROOT environment variable to supersede GOPATH
  deduction and explicitly set the current project's root (#1883).
- dep ensure now explains what changes to the code or Gopkg.toml have
  induced solving (#1912).
- Hash digests of vendor contents are now stored in Gopkg.lock, and
  the contents of vendor are only rewritten on change or hash
  mismatch (#1912).
- Added support for ppc64/ppc64le.
- New subcommand dep check quickly reports if imports, Gopkg.toml,
  Gopkg.lock, and vendor are out of sync (#1932).

BUG FIXES:

- Excise certain git-related environment variables. (#1872)

IMPROVEMENTS:

- Add template operations support in dep status template output (#1549).
- Reduce network access by trusting local source information and only
  pulling from upstream when necessary (#1250).
- Update our dependency on Masterminds/semver to follow upstream again
  now that Masterminds/semver#67 is merged(#1792).
- inputs-digest was removed from Gopkg.lock (#1912).
- Hash digests of vendor contents are now stored in Gopkg.lock, and
  the contents of vendor are only rewritten on change or hash
  mismatch (#1912).
- Don't exclude Godeps folder (#1822).
- Add project-package relationship graph support in graphviz (#1588).
- Limit concurrency of dep status to avoid hitting open file
  limits (#1923).

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
halstead pushed a commit to openembedded/openembedded-core that referenced this pull request Aug 30, 2018
NEW FEATURES:

- Add CI tests against go1.10. Drop support for go1.8. (#1620).
- Added install.sh script. (#1533).
- List out of date projects in dep status (#1553).
- Enabled opt-in persistent caching via DEPCACHEAGE env var. (#1711).
- Allow DEPPROJECTROOT environment variable to supersede GOPATH
  deduction and explicitly set the current project's root (#1883).
- dep ensure now explains what changes to the code or Gopkg.toml have
  induced solving (#1912).
- Hash digests of vendor contents are now stored in Gopkg.lock, and
  the contents of vendor are only rewritten on change or hash
  mismatch (#1912).
- Added support for ppc64/ppc64le.
- New subcommand dep check quickly reports if imports, Gopkg.toml,
  Gopkg.lock, and vendor are out of sync (#1932).

BUG FIXES:

- Excise certain git-related environment variables. (#1872)

IMPROVEMENTS:

- Add template operations support in dep status template output (#1549).
- Reduce network access by trusting local source information and only
  pulling from upstream when necessary (#1250).
- Update our dependency on Masterminds/semver to follow upstream again
  now that Masterminds/semver#67 is merged(#1792).
- inputs-digest was removed from Gopkg.lock (#1912).
- Hash digests of vendor contents are now stored in Gopkg.lock, and
  the contents of vendor are only rewritten on change or hash
  mismatch (#1912).
- Don't exclude Godeps folder (#1822).
- Add project-package relationship graph support in graphviz (#1588).
- Limit concurrency of dep status to avoid hitting open file
  limits (#1923).

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
halstead pushed a commit to openembedded/openembedded-core that referenced this pull request Aug 30, 2018
NEW FEATURES:

- Add CI tests against go1.10. Drop support for go1.8. (#1620).
- Added install.sh script. (#1533).
- List out of date projects in dep status (#1553).
- Enabled opt-in persistent caching via DEPCACHEAGE env var. (#1711).
- Allow DEPPROJECTROOT environment variable to supersede GOPATH
  deduction and explicitly set the current project's root (#1883).
- dep ensure now explains what changes to the code or Gopkg.toml have
  induced solving (#1912).
- Hash digests of vendor contents are now stored in Gopkg.lock, and
  the contents of vendor are only rewritten on change or hash
  mismatch (#1912).
- Added support for ppc64/ppc64le.
- New subcommand dep check quickly reports if imports, Gopkg.toml,
  Gopkg.lock, and vendor are out of sync (#1932).

BUG FIXES:

- Excise certain git-related environment variables. (#1872)

IMPROVEMENTS:

- Add template operations support in dep status template output (#1549).
- Reduce network access by trusting local source information and only
  pulling from upstream when necessary (#1250).
- Update our dependency on Masterminds/semver to follow upstream again
  now that Masterminds/semver#67 is merged(#1792).
- inputs-digest was removed from Gopkg.lock (#1912).
- Hash digests of vendor contents are now stored in Gopkg.lock, and
  the contents of vendor are only rewritten on change or hash
  mismatch (#1912).
- Don't exclude Godeps folder (#1822).
- Add project-package relationship graph support in graphviz (#1588).
- Limit concurrency of dep status to avoid hitting open file
  limits (#1923).

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
halstead pushed a commit to openembedded/openembedded-core that referenced this pull request Aug 31, 2018
NEW FEATURES:

- Add CI tests against go1.10. Drop support for go1.8. (#1620).
- Added install.sh script. (#1533).
- List out of date projects in dep status (#1553).
- Enabled opt-in persistent caching via DEPCACHEAGE env var. (#1711).
- Allow DEPPROJECTROOT environment variable to supersede GOPATH
  deduction and explicitly set the current project's root (#1883).
- dep ensure now explains what changes to the code or Gopkg.toml have
  induced solving (#1912).
- Hash digests of vendor contents are now stored in Gopkg.lock, and
  the contents of vendor are only rewritten on change or hash
  mismatch (#1912).
- Added support for ppc64/ppc64le.
- New subcommand dep check quickly reports if imports, Gopkg.toml,
  Gopkg.lock, and vendor are out of sync (#1932).

BUG FIXES:

- Excise certain git-related environment variables. (#1872)

IMPROVEMENTS:

- Add template operations support in dep status template output (#1549).
- Reduce network access by trusting local source information and only
  pulling from upstream when necessary (#1250).
- Update our dependency on Masterminds/semver to follow upstream again
  now that Masterminds/semver#67 is merged(#1792).
- inputs-digest was removed from Gopkg.lock (#1912).
- Hash digests of vendor contents are now stored in Gopkg.lock, and
  the contents of vendor are only rewritten on change or hash
  mismatch (#1912).
- Don't exclude Godeps folder (#1822).
- Add project-package relationship graph support in graphviz (#1588).
- Limit concurrency of dep status to avoid hitting open file
  limits (#1923).

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
halstead pushed a commit to openembedded/openembedded-core that referenced this pull request Aug 31, 2018
NEW FEATURES:

- Add CI tests against go1.10. Drop support for go1.8. (#1620).
- Added install.sh script. (#1533).
- List out of date projects in dep status (#1553).
- Enabled opt-in persistent caching via DEPCACHEAGE env var. (#1711).
- Allow DEPPROJECTROOT environment variable to supersede GOPATH
  deduction and explicitly set the current project's root (#1883).
- dep ensure now explains what changes to the code or Gopkg.toml have
  induced solving (#1912).
- Hash digests of vendor contents are now stored in Gopkg.lock, and
  the contents of vendor are only rewritten on change or hash
  mismatch (#1912).
- Added support for ppc64/ppc64le.
- New subcommand dep check quickly reports if imports, Gopkg.toml,
  Gopkg.lock, and vendor are out of sync (#1932).

BUG FIXES:

- Excise certain git-related environment variables. (#1872)

IMPROVEMENTS:

- Add template operations support in dep status template output (#1549).
- Reduce network access by trusting local source information and only
  pulling from upstream when necessary (#1250).
- Update our dependency on Masterminds/semver to follow upstream again
  now that Masterminds/semver#67 is merged(#1792).
- inputs-digest was removed from Gopkg.lock (#1912).
- Hash digests of vendor contents are now stored in Gopkg.lock, and
  the contents of vendor are only rewritten on change or hash
  mismatch (#1912).
- Don't exclude Godeps folder (#1822).
- Add project-package relationship graph support in graphviz (#1588).
- Limit concurrency of dep status to avoid hitting open file
  limits (#1923).

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
halstead pushed a commit to openembedded/openembedded-core that referenced this pull request Sep 4, 2018
NEW FEATURES:

- Add CI tests against go1.10. Drop support for go1.8. (#1620).
- Added install.sh script. (#1533).
- List out of date projects in dep status (#1553).
- Enabled opt-in persistent caching via DEPCACHEAGE env var. (#1711).
- Allow DEPPROJECTROOT environment variable to supersede GOPATH
  deduction and explicitly set the current project's root (#1883).
- dep ensure now explains what changes to the code or Gopkg.toml have
  induced solving (#1912).
- Hash digests of vendor contents are now stored in Gopkg.lock, and
  the contents of vendor are only rewritten on change or hash
  mismatch (#1912).
- Added support for ppc64/ppc64le.
- New subcommand dep check quickly reports if imports, Gopkg.toml,
  Gopkg.lock, and vendor are out of sync (#1932).

BUG FIXES:

- Excise certain git-related environment variables. (#1872)

IMPROVEMENTS:

- Add template operations support in dep status template output (#1549).
- Reduce network access by trusting local source information and only
  pulling from upstream when necessary (#1250).
- Update our dependency on Masterminds/semver to follow upstream again
  now that Masterminds/semver#67 is merged(#1792).
- inputs-digest was removed from Gopkg.lock (#1912).
- Hash digests of vendor contents are now stored in Gopkg.lock, and
  the contents of vendor are only rewritten on change or hash
  mismatch (#1912).
- Don't exclude Godeps folder (#1822).
- Add project-package relationship graph support in graphviz (#1588).
- Limit concurrency of dep status to avoid hitting open file
  limits (#1923).

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
jpuhlman pushed a commit to MontaVista-OpenSourceTechnology/poky that referenced this pull request Sep 6, 2018
Source: poky
MR: 00000
Type: Integration
Disposition: Merged from poky
ChangeID: de71940
Description:

NEW FEATURES:

- Add CI tests against go1.10. Drop support for go1.8. (#1620).
- Added install.sh script. (#1533).
- List out of date projects in dep status (#1553).
- Enabled opt-in persistent caching via DEPCACHEAGE env var. (#1711).
- Allow DEPPROJECTROOT environment variable to supersede GOPATH
  deduction and explicitly set the current project's root (#1883).
- dep ensure now explains what changes to the code or Gopkg.toml have
  induced solving (#1912).
- Hash digests of vendor contents are now stored in Gopkg.lock, and
  the contents of vendor are only rewritten on change or hash
  mismatch (#1912).
- Added support for ppc64/ppc64le.
- New subcommand dep check quickly reports if imports, Gopkg.toml,
  Gopkg.lock, and vendor are out of sync (#1932).

BUG FIXES:

- Excise certain git-related environment variables. (#1872)

IMPROVEMENTS:

- Add template operations support in dep status template output (#1549).
- Reduce network access by trusting local source information and only
  pulling from upstream when necessary (#1250).
- Update our dependency on Masterminds/semver to follow upstream again
  now that Masterminds/semver#67 is merged(#1792).
- inputs-digest was removed from Gopkg.lock (#1912).
- Hash digests of vendor contents are now stored in Gopkg.lock, and
  the contents of vendor are only rewritten on change or hash
  mismatch (#1912).
- Don't exclude Godeps folder (#1822).
- Add project-package relationship graph support in graphviz (#1588).
- Limit concurrency of dep status to avoid hitting open file
  limits (#1923).

(From OE-Core rev: 165da89292f81d236e4e8e652500b8879c2ad9be)

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Jeremy Puhlman <jpuhlman@mvista.com>
daregit pushed a commit to daregit/yocto-combined that referenced this pull request May 22, 2024
NEW FEATURES:

- Add CI tests against go1.10. Drop support for go1.8. (#1620).
- Added install.sh script. (#1533).
- List out of date projects in dep status (#1553).
- Enabled opt-in persistent caching via DEPCACHEAGE env var. (#1711).
- Allow DEPPROJECTROOT environment variable to supersede GOPATH
  deduction and explicitly set the current project's root (#1883).
- dep ensure now explains what changes to the code or Gopkg.toml have
  induced solving (#1912).
- Hash digests of vendor contents are now stored in Gopkg.lock, and
  the contents of vendor are only rewritten on change or hash
  mismatch (#1912).
- Added support for ppc64/ppc64le.
- New subcommand dep check quickly reports if imports, Gopkg.toml,
  Gopkg.lock, and vendor are out of sync (#1932).

BUG FIXES:

- Excise certain git-related environment variables. (#1872)

IMPROVEMENTS:

- Add template operations support in dep status template output (#1549).
- Reduce network access by trusting local source information and only
  pulling from upstream when necessary (#1250).
- Update our dependency on Masterminds/semver to follow upstream again
  now that Masterminds/semver#67 is merged(#1792).
- inputs-digest was removed from Gopkg.lock (#1912).
- Hash digests of vendor contents are now stored in Gopkg.lock, and
  the contents of vendor are only rewritten on change or hash
  mismatch (#1912).
- Don't exclude Godeps folder (#1822).
- Add project-package relationship graph support in graphviz (#1588).
- Limit concurrency of dep status to avoid hitting open file
  limits (#1923).

(From OE-Core rev: 165da89292f81d236e4e8e652500b8879c2ad9be)

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
daregit pushed a commit to daregit/yocto-combined that referenced this pull request May 22, 2024
NEW FEATURES:

- Add CI tests against go1.10. Drop support for go1.8. (#1620).
- Added install.sh script. (#1533).
- List out of date projects in dep status (#1553).
- Enabled opt-in persistent caching via DEPCACHEAGE env var. (#1711).
- Allow DEPPROJECTROOT environment variable to supersede GOPATH
  deduction and explicitly set the current project's root (#1883).
- dep ensure now explains what changes to the code or Gopkg.toml have
  induced solving (#1912).
- Hash digests of vendor contents are now stored in Gopkg.lock, and
  the contents of vendor are only rewritten on change or hash
  mismatch (#1912).
- Added support for ppc64/ppc64le.
- New subcommand dep check quickly reports if imports, Gopkg.toml,
  Gopkg.lock, and vendor are out of sync (#1932).

BUG FIXES:

- Excise certain git-related environment variables. (#1872)

IMPROVEMENTS:

- Add template operations support in dep status template output (#1549).
- Reduce network access by trusting local source information and only
  pulling from upstream when necessary (#1250).
- Update our dependency on Masterminds/semver to follow upstream again
  now that Masterminds/semver#67 is merged(#1792).
- inputs-digest was removed from Gopkg.lock (#1912).
- Hash digests of vendor contents are now stored in Gopkg.lock, and
  the contents of vendor are only rewritten on change or hash
  mismatch (#1912).
- Don't exclude Godeps folder (#1822).
- Add project-package relationship graph support in graphviz (#1588).
- Limit concurrency of dep status to avoid hitting open file
  limits (#1923).

(From OE-Core rev: 165da89292f81d236e4e8e652500b8879c2ad9be)

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
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