-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve support for git reference kinds (
branch
, tag
, rev
), imp…
…rove fetching behaviour (#1045) * Add proper support for git reference kinds (`branch`, `tag`, `rev`) Works toward resolving #1019, however tests and examples still need to be updated. Previously, we initialised the temporary git repository with a `clone` operation. By default, this only fetches a subset of git references, meaning that using references other than those provided by default with `clone` failed to resolve. Inspired by cargo, this commit updates the behaviour to instead first initialise the repository, then attempt to fetch only those references that are relevant to the user specified git reference. In order to construct an accurate set of `refspecs` and fetch only the relevant commits, its useful to retain knowledge about the *kind* of git reference. This introduces a new `GitReference` type and updates the git source lock file serialization to account for this. * Update example `Forc.lock` files for git reference changes * Update E2E test `Forc.lock` files for git reference changes * Validate the commit hash while parsing `SourceGitPinned` from str
- Loading branch information
1 parent
5840399
commit cf5c3d1
Showing
74 changed files
with
466 additions
and
321 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -1,13 +1,13 @@ | ||
[[package]] | ||
name = 'core' | ||
source = 'git+https://github.com/FuelLabs/sway-lib-core?reference=master#30274cf817c1848e28f984c2e8703eb25e7a3a44' | ||
source = 'git+https://github.com/FuelLabs/sway-lib-core?branch=master#082bc8eb0616586ac0000825bfe6e9d47b0c713f' | ||
dependencies = [] | ||
|
||
[[package]] | ||
name = 'counter' | ||
dependencies = ['std git+https://github.com/FuelLabs/sway-lib-std?reference=master#aa36aea9362575c769781e7ab640d1d75dce13c8'] | ||
dependencies = ['std git+https://github.com/FuelLabs/sway-lib-std?branch=master#3884e9bbadb7c2567700dae847017366629241d3'] | ||
|
||
[[package]] | ||
name = 'std' | ||
source = 'git+https://github.com/FuelLabs/sway-lib-std?reference=master#aa36aea9362575c769781e7ab640d1d75dce13c8' | ||
dependencies = ['core git+https://github.com/FuelLabs/sway-lib-core?reference=master#30274cf817c1848e28f984c2e8703eb25e7a3a44'] | ||
source = 'git+https://github.com/FuelLabs/sway-lib-std?branch=master#3884e9bbadb7c2567700dae847017366629241d3' | ||
dependencies = ['core git+https://github.com/FuelLabs/sway-lib-core?branch=master#082bc8eb0616586ac0000825bfe6e9d47b0c713f'] |
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 |
---|---|---|
@@ -1,13 +1,13 @@ | ||
[[package]] | ||
name = 'core' | ||
source = 'git+https://github.com/FuelLabs/sway-lib-core?reference=master#30274cf817c1848e28f984c2e8703eb25e7a3a44' | ||
source = 'git+https://github.com/FuelLabs/sway-lib-core?branch=master#082bc8eb0616586ac0000825bfe6e9d47b0c713f' | ||
dependencies = [] | ||
|
||
[[package]] | ||
name = 'fizzbuzz' | ||
dependencies = ['std git+https://github.com/FuelLabs/sway-lib-std?reference=master#aa36aea9362575c769781e7ab640d1d75dce13c8'] | ||
dependencies = ['std git+https://github.com/FuelLabs/sway-lib-std?branch=master#3884e9bbadb7c2567700dae847017366629241d3'] | ||
|
||
[[package]] | ||
name = 'std' | ||
source = 'git+https://github.com/FuelLabs/sway-lib-std?reference=master#aa36aea9362575c769781e7ab640d1d75dce13c8' | ||
dependencies = ['core git+https://github.com/FuelLabs/sway-lib-core?reference=master#30274cf817c1848e28f984c2e8703eb25e7a3a44'] | ||
source = 'git+https://github.com/FuelLabs/sway-lib-std?branch=master#3884e9bbadb7c2567700dae847017366629241d3' | ||
dependencies = ['core git+https://github.com/FuelLabs/sway-lib-core?branch=master#082bc8eb0616586ac0000825bfe6e9d47b0c713f'] |
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 |
---|---|---|
@@ -1,13 +1,13 @@ | ||
[[package]] | ||
name = 'core' | ||
source = 'git+https://github.com/FuelLabs/sway-lib-core?reference=master#30274cf817c1848e28f984c2e8703eb25e7a3a44' | ||
source = 'git+https://github.com/FuelLabs/sway-lib-core?branch=master#082bc8eb0616586ac0000825bfe6e9d47b0c713f' | ||
dependencies = [] | ||
|
||
[[package]] | ||
name = 'hello_world' | ||
dependencies = ['std git+https://github.com/FuelLabs/sway-lib-std?reference=master#aa36aea9362575c769781e7ab640d1d75dce13c8'] | ||
dependencies = ['std git+https://github.com/FuelLabs/sway-lib-std?branch=master#3884e9bbadb7c2567700dae847017366629241d3'] | ||
|
||
[[package]] | ||
name = 'std' | ||
source = 'git+https://github.com/FuelLabs/sway-lib-std?reference=master#aa36aea9362575c769781e7ab640d1d75dce13c8' | ||
dependencies = ['core git+https://github.com/FuelLabs/sway-lib-core?reference=master#30274cf817c1848e28f984c2e8703eb25e7a3a44'] | ||
source = 'git+https://github.com/FuelLabs/sway-lib-std?branch=master#3884e9bbadb7c2567700dae847017366629241d3' | ||
dependencies = ['core git+https://github.com/FuelLabs/sway-lib-core?branch=master#082bc8eb0616586ac0000825bfe6e9d47b0c713f'] |
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 |
---|---|---|
@@ -1,13 +1,13 @@ | ||
[[package]] | ||
name = 'core' | ||
source = 'git+https://github.com/FuelLabs/sway-lib-core?reference=master#30274cf817c1848e28f984c2e8703eb25e7a3a44' | ||
source = 'git+https://github.com/FuelLabs/sway-lib-core?branch=master#082bc8eb0616586ac0000825bfe6e9d47b0c713f' | ||
dependencies = [] | ||
|
||
[[package]] | ||
name = 'std' | ||
source = 'git+https://github.com/FuelLabs/sway-lib-std?reference=master#aa36aea9362575c769781e7ab640d1d75dce13c8' | ||
dependencies = ['core git+https://github.com/FuelLabs/sway-lib-core?reference=master#30274cf817c1848e28f984c2e8703eb25e7a3a44'] | ||
source = 'git+https://github.com/FuelLabs/sway-lib-std?branch=master#3884e9bbadb7c2567700dae847017366629241d3' | ||
dependencies = ['core git+https://github.com/FuelLabs/sway-lib-core?branch=master#082bc8eb0616586ac0000825bfe6e9d47b0c713f'] | ||
|
||
[[package]] | ||
name = 'subcurrency' | ||
dependencies = ['std git+https://github.com/FuelLabs/sway-lib-std?reference=master#aa36aea9362575c769781e7ab640d1d75dce13c8'] | ||
dependencies = ['std git+https://github.com/FuelLabs/sway-lib-std?branch=master#3884e9bbadb7c2567700dae847017366629241d3'] |
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 |
---|---|---|
@@ -1,13 +1,13 @@ | ||
[[package]] | ||
name = 'core' | ||
source = 'git+https://github.com/FuelLabs/sway-lib-core?reference=master#30274cf817c1848e28f984c2e8703eb25e7a3a44' | ||
source = 'git+https://github.com/FuelLabs/sway-lib-core?branch=master#082bc8eb0616586ac0000825bfe6e9d47b0c713f' | ||
dependencies = [] | ||
|
||
[[package]] | ||
name = 'std' | ||
source = 'git+https://github.com/FuelLabs/sway-lib-std?reference=master#aa36aea9362575c769781e7ab640d1d75dce13c8' | ||
dependencies = ['core git+https://github.com/FuelLabs/sway-lib-core?reference=master#30274cf817c1848e28f984c2e8703eb25e7a3a44'] | ||
source = 'git+https://github.com/FuelLabs/sway-lib-std?branch=master#3884e9bbadb7c2567700dae847017366629241d3' | ||
dependencies = ['core git+https://github.com/FuelLabs/sway-lib-core?branch=master#082bc8eb0616586ac0000825bfe6e9d47b0c713f'] | ||
|
||
[[package]] | ||
name = 'wallet_smart_contract' | ||
dependencies = ['std git+https://github.com/FuelLabs/sway-lib-std?reference=master#aa36aea9362575c769781e7ab640d1d75dce13c8'] | ||
dependencies = ['std git+https://github.com/FuelLabs/sway-lib-std?branch=master#3884e9bbadb7c2567700dae847017366629241d3'] |
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
Oops, something went wrong.