-
Notifications
You must be signed in to change notification settings - Fork 300
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
Make x-add-version not require changes be committed first. #1616
Merged
Merged
Changes from 7 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
dab57e6
Make x-add-version not require changes be committed first.
BillyONeal 3687831
Missed a file.
BillyONeal 2cf695a
Change x-add-version port-name to only make the tree for the port-dir…
BillyONeal 51561a9
Switch to reusing the existing index for slightly better perf and to …
BillyONeal 110a5ae
Remove no longer necessary add/commit steps from versions test.
BillyONeal 1d4fd0c
Add test for executable bit being handled correctly to ci-verify-vers…
BillyONeal 3b8092d
Add core.untrackedCache=false to the add to hopefully fix Ubuntu.
BillyONeal 6717bb0
Improve error messages as (mostly) suggested by @vicroms
BillyONeal File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
1 change: 1 addition & 0 deletions
1
azure-pipelines/e2e-assets/ci-verify-versions-registry/ports/executable-bit/portfile.cmake
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
set(VCPKG_POLICY_EMPTY_PACKAGE enabled) |
2 changes: 2 additions & 0 deletions
2
azure-pipelines/e2e-assets/ci-verify-versions-registry/ports/executable-bit/some-script.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/bin/sh | ||
echo 'Hello World!' |
4 changes: 4 additions & 0 deletions
4
azure-pipelines/e2e-assets/ci-verify-versions-registry/ports/executable-bit/vcpkg.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"name": "executable-bit", | ||
"version": "1.0" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
azure-pipelines/e2e-assets/ci-verify-versions-registry/versions/e-/executable-bit.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"versions": [ | ||
{ | ||
"git-tree": "6fb9e388021421a5bf6e2cb1f57c67e9ceb6ee43", | ||
"version": "1.0", | ||
"port-version": 0 | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,14 +2,12 @@ | |
|
||
Copy-Item -Recurse "$PSScriptRoot/../e2e-assets/ci-verify-versions-registry" "$TestingRoot/ci-verify-versions-registry" | ||
git -C "$TestingRoot/ci-verify-versions-registry" @gitConfigOptions init | ||
git -C "$TestingRoot/ci-verify-versions-registry" @gitConfigOptions add --chmod=+x 'ports/executable-bit/some-script.sh' | ||
git -C "$TestingRoot/ci-verify-versions-registry" @gitConfigOptions add -A | ||
git -C "$TestingRoot/ci-verify-versions-registry" @gitConfigOptions commit -m testing | ||
Move-Item "$TestingRoot/ci-verify-versions-registry/old-port-versions/has-local-edits" "$TestingRoot/ci-verify-versions-registry/ports" | ||
|
||
$expected = @" | ||
$TestingRoot/ci-verify-versions-registry/ports/malformed/vcpkg.json:4:3: error: Unexpected character; expected property name | ||
on expression: ~broken | ||
^ | ||
$TestingRoot/ci-verify-versions-registry/versions/b-/bad-git-tree.json: error: [email protected] git tree 000000070c5f496fcf1a97cf654d5e81f0d2685a does not match the port directory | ||
$TestingRoot/ci-verify-versions-registry/ports/bad-git-tree: note: the port directory has git tree 6528b2c70c5f496fcf1a97cf654d5e81f0d2685a | ||
$TestingRoot/ci-verify-versions-registry/ports/bad-git-tree/vcpkg.json: note: if [email protected] is already published, update this file with a new version or port-version, commit it, then add the new version by running: | ||
|
@@ -41,34 +39,34 @@ note: you can run the following commands to add the current version of baseline- | |
git add versions | ||
git commit -m `"Update version database`" | ||
$TestingRoot/ci-verify-versions-registry/ports/baseline-version-missing/vcpkg.json: message: all version constraints are consistent with the version database | ||
$TestingRoot/ci-verify-versions-registry/ports/dependency-not-in-versions-database: message: [email protected] is correctly in the version database (321c8b400526dc412a987285ef469eec6221a4b4) | ||
$TestingRoot/ci-verify-versions-registry/versions/baseline.json: message: [email protected] matches the current baseline | ||
$TestingRoot/ci-verify-versions-registry/ports/dependency-not-in-versions-database/vcpkg.json: error: the dependency no-versions does not exist in the version database; does that port exist? | ||
$TestingRoot/ci-verify-versions-registry/ports/dependency-not-in-versions-database-feature: message: [email protected] is correctly in the version database (2298ee25ea54ed92595250a2be07d01bdd76f47c) | ||
$TestingRoot/ci-verify-versions-registry/versions/baseline.json: message: [email protected] matches the current baseline | ||
$TestingRoot/ci-verify-versions-registry/ports/dependency-not-in-versions-database-feature/vcpkg.json: error: the dependency no-versions does not exist in the version database; does that port exist? | ||
note: the dependency is in the feature named add-things | ||
$TestingRoot/ci-verify-versions-registry/ports/dependency-version-not-in-versions-database: message: [email protected] is correctly in the version database (f0d44555fe7714929e432ab9e12a436e28ffef9e) | ||
$TestingRoot/ci-verify-versions-registry/versions/baseline.json: message: [email protected] matches the current baseline | ||
$TestingRoot/ci-verify-versions-registry/ports/dependency-version-not-in-versions-database/vcpkg.json: error: the "version>=" constraint to good names version 0.9 which does not exist in the version database. All versions must exist in the version database to be interpreted by vcpkg. | ||
$TestingRoot/ci-verify-versions-registry/versions/g-/good.json: note: consider removing the version constraint or choosing a value declared here | ||
$TestingRoot/ci-verify-versions-registry/ports/dependency-not-in-versions-database: message: [email protected] is correctly in the version database (321c8b400526dc412a987285ef469eec6221a4b4) | ||
$TestingRoot/ci-verify-versions-registry/versions/baseline.json: message: [email protected] matches the current baseline | ||
$TestingRoot/ci-verify-versions-registry/ports/dependency-not-in-versions-database/vcpkg.json: error: the dependency no-versions does not exist in the version database; does that port exist? | ||
$TestingRoot/ci-verify-versions-registry/ports/dependency-version-not-in-versions-database-feature: message: [email protected] is correctly in the version database (ba3008bb2d42c61f172b7d9592de0212edf20fc6) | ||
$TestingRoot/ci-verify-versions-registry/versions/baseline.json: message: [email protected] matches the current baseline | ||
$TestingRoot/ci-verify-versions-registry/ports/dependency-version-not-in-versions-database-feature/vcpkg.json: error: the "version>=" constraint to good names version 0.9 which does not exist in the version database. All versions must exist in the version database to be interpreted by vcpkg. | ||
$TestingRoot/ci-verify-versions-registry/versions/g-/good.json: note: consider removing the version constraint or choosing a value declared here | ||
note: the dependency is in the feature named add-things | ||
$TestingRoot/ci-verify-versions-registry/ports/dependency-version-not-in-versions-database: message: [email protected] is correctly in the version database (f0d44555fe7714929e432ab9e12a436e28ffef9e) | ||
$TestingRoot/ci-verify-versions-registry/versions/baseline.json: message: [email protected] matches the current baseline | ||
$TestingRoot/ci-verify-versions-registry/ports/dependency-version-not-in-versions-database/vcpkg.json: error: the "version>=" constraint to good names version 0.9 which does not exist in the version database. All versions must exist in the version database to be interpreted by vcpkg. | ||
$TestingRoot/ci-verify-versions-registry/versions/g-/good.json: note: consider removing the version constraint or choosing a value declared here | ||
$TestingRoot/ci-verify-versions-registry/ports/executable-bit: message: [email protected] is correctly in the version database (6fb9e388021421a5bf6e2cb1f57c67e9ceb6ee43) | ||
$TestingRoot/ci-verify-versions-registry/versions/baseline.json: message: [email protected] matches the current baseline | ||
$TestingRoot/ci-verify-versions-registry/ports/executable-bit/vcpkg.json: message: all version constraints are consistent with the version database | ||
$TestingRoot/ci-verify-versions-registry/ports/good: message: [email protected] is correctly in the version database (0f3d67db0dbb6aa5499bc09367a606b495e16d35) | ||
$TestingRoot/ci-verify-versions-registry/versions/baseline.json: message: [email protected] matches the current baseline | ||
$TestingRoot/ci-verify-versions-registry/ports/good/vcpkg.json: message: all version constraints are consistent with the version database | ||
$TestingRoot/ci-verify-versions-registry/ports/has-local-edits/vcpkg.json: error: the git tree of the port directory could not be determined. This is usually caused by uncommitted changes. | ||
note: you can commit your changes and add them to the version database by running: | ||
git add "$TestingRoot/ci-verify-versions-registry/ports/has-local-edits" | ||
git commit -m wip | ||
vcpkg x-add-version has-local-edits | ||
git add versions | ||
git commit --amend -m "[has-local-edits] Add new port" | ||
$TestingRoot/ci-verify-versions-registry/ports/has-local-edits: message: [email protected] is correctly in the version database (b1d7f6030942b329a200f16c931c01e2ec9e1e79) | ||
$TestingRoot/ci-verify-versions-registry/versions/baseline.json: message: [email protected] matches the current baseline | ||
$TestingRoot/ci-verify-versions-registry/ports/has-local-edits/vcpkg.json: message: all version constraints are consistent with the version database | ||
$TestingRoot/ci-verify-versions-registry/ports/malformed/vcpkg.json:4:3: error: Unexpected character; expected property name | ||
on expression: ~broken | ||
^ | ||
$TestingRoot/ci-verify-versions-registry/versions/m-/mismatch-git-tree.json: error: [email protected] git tree 41d20d2a02d75343b0933b624faf9f061b112dad does not match the port directory | ||
$TestingRoot/ci-verify-versions-registry/ports/mismatch-git-tree: note: the port directory has git tree 34b3289caaa7a97950828905d354dc971c3c15a7 | ||
$TestingRoot/ci-verify-versions-registry/ports/mismatch-git-tree/vcpkg.json: note: if [email protected] is already published, update this file with a new version or port-version, commit it, then add the new version by running: | ||
|
@@ -129,6 +127,7 @@ $TestingRoot/ci-verify-versions-registry/versions/d-/dependency-not-in-versions- | |
$TestingRoot/ci-verify-versions-registry/versions/d-/dependency-not-in-versions-database-feature.json: message: [email protected] is correctly in the version database (2298ee25ea54ed92595250a2be07d01bdd76f47c) | ||
$TestingRoot/ci-verify-versions-registry/versions/d-/dependency-version-not-in-versions-database.json: message: [email protected] is correctly in the version database (f0d44555fe7714929e432ab9e12a436e28ffef9e) | ||
$TestingRoot/ci-verify-versions-registry/versions/d-/dependency-version-not-in-versions-database-feature.json: message: [email protected] is correctly in the version database (ba3008bb2d42c61f172b7d9592de0212edf20fc6) | ||
$TestingRoot/ci-verify-versions-registry/versions/e-/executable-bit.json: message: [email protected] is correctly in the version database (6fb9e388021421a5bf6e2cb1f57c67e9ceb6ee43) | ||
$TestingRoot/ci-verify-versions-registry/versions/g-/good.json: message: [email protected] is correctly in the version database (0f3d67db0dbb6aa5499bc09367a606b495e16d35) | ||
$TestingRoot/ci-verify-versions-registry/versions/h-/has-local-edits.json: message: [email protected] is correctly in the version database (b1d7f6030942b329a200f16c931c01e2ec9e1e79) | ||
$TestingRoot/ci-verify-versions-registry/versions/m-/malformed.json: $buildtreesRoot/versioning_/versions/malformed/a1f22424b0fb1460200c12e1b7933f309f9c8373/vcpkg.json:4:3: error: Unexpected character; expected property name | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#pragma once | ||
|
||
namespace vcpkg | ||
{ | ||
enum class DiagKind | ||
{ | ||
None, // foo.h: localized | ||
Message, // foo.h: message: localized | ||
Error, // foo.h: error: localized | ||
Warning, // foo.h: warning: localized | ||
Note, // foo.h: note: localized | ||
COUNT | ||
}; | ||
|
||
struct TextRowCol; | ||
struct DiagnosticLine; | ||
struct DiagnosticContext; | ||
struct PrintingDiagnosticContext; | ||
struct BufferedDiagnosticContext; | ||
struct FullyBufferedDiagnosticContext; | ||
struct AttemptDiagnosticContext; | ||
struct WarningDiagnosticContext; | ||
|
||
extern DiagnosticContext& console_diagnostic_context; | ||
extern DiagnosticContext& status_only_diagnostic_context; | ||
extern DiagnosticContext& null_diagnostic_context; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,4 +3,5 @@ | |
namespace vcpkg | ||
{ | ||
struct GitConfig; | ||
struct GitLSTreeEntry; | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This additional test was added with the change to reuse the existing index done in response to
x-ci-verify-versions
failing on the real github.com/microsoft/vcpkg. Because I was always making new trees that don't have the git-only-on-Windows-anyway+x
bit, the new trees had different SHAs than our version database says, resulting in failures.In the following message to the team I sent when I just discovered this problem I'm using
git diff-tree
on some of the openssl trees andports\openssl\unix\configure
shows up because it's got a+x
.(Sorry it's just a screenshot; now that I fixed the problem it'd be annoying to try to recreate the broken behavior and it isn't super important now that it is fixed and has a regression test anyway)