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

[vcpkg registries] Registries: Take 2 #13590

Merged
merged 3 commits into from Feb 3, 2021

Conversation

strega-nil
Copy link
Contributor

@strega-nil strega-nil commented Sep 17, 2020

This RFC is the new state of the world with regard to our plan for registries; it is very different from the old RFC. It includes registry databases, which are how one describes the set of versions of ports that one has access to. It also includes the specification for git registries, and updates the specification for filesystem registries with these new registry databases.

Since this RFC completely changes how registries work, the existing implementation will be broken.

Rendered

Copy link
Member

@BillyONeal BillyONeal left a comment

Choose a reason for hiding this comment

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

Thanks for your great work!

docs/specifications/git-registries.md Outdated Show resolved Hide resolved
docs/specifications/git-registries.md Outdated Show resolved Hide resolved
docs/specifications/git-registries.md Outdated Show resolved Hide resolved
docs/specifications/git-registries.md Outdated Show resolved Hide resolved
docs/specifications/git-registries.md Outdated Show resolved Hide resolved
docs/specifications/git-registries.md Outdated Show resolved Hide resolved
@JackBoosY JackBoosY added category:vcpkg-feature The issue is a new capability of the tool that doesn’t already exist and we haven’t committed info:internal This PR or Issue was filed by the vcpkg team. labels Sep 18, 2020
@strega-nil strega-nil changed the title [vcpkg registries] RFC for Git Registries [vcpkg registries] Registries: Take 2 Oct 9, 2020
docs/specifications/registries-2.md Outdated Show resolved Hide resolved
docs/specifications/registries-2.md Show resolved Hide resolved
docs/specifications/registries-2.md Outdated Show resolved Hide resolved
docs/specifications/registries-2.md Outdated Show resolved Hide resolved
docs/specifications/registries-2.md Outdated Show resolved Hide resolved
docs/specifications/registries-2.md Outdated Show resolved Hide resolved
docs/specifications/registries-2.md Outdated Show resolved Hide resolved
docs/specifications/registries-2.md Outdated Show resolved Hide resolved
docs/specifications/registries-2.md Outdated Show resolved Hide resolved
docs/specifications/registries-2.md Outdated Show resolved Hide resolved
@klalumiere
Copy link
Contributor

The RFC is super interesting! 🤓

Something it doesn't talk about is triplets. Will it be possible to store them in the registry alongside the ports?

A little more details about the context/motivations of my question might help. Right now, in our prototype integration of vcpkg, we do something like vcpkg install mypackage:x64-linux-dynamic --overlay-ports ../vcpkg-overlays/ports --overlay-triplets ../vcpkg-overlays/triplets. When available, registries and vcpkg-configuration.json will "manage" the --overlay-ports ../vcpkg-overlays/ports for us. Actually it will do much more: pulling the repository for us, locking the SHA, etc. Will we be able to get rid of the --overlay-triplets ../vcpkg-overlays/tripplets part too?

@strega-nil
Copy link
Contributor Author

@klalumiere we may consider adding triplet registries at some point, but the plan at this point is to just add overlay triplets to the configuration file.

Comment on lines +133 to +146
[
{
"version-string": "1.12.7",
"git-tree": "466e96fd2e17dd2453aa31dc0bc61bdcf53e7f61",
},
{
"version-string": "1.12.1",
"port-version": 1,
"git-tree": "0de81b4f7e0ec24966e929c2ea64e16c15e71d5e",
},
...
]
Copy link
Member

Choose a reason for hiding this comment

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

Database generator implemented according to spec in PR #13777

@strega-nil
Copy link
Contributor Author

strega-nil commented Oct 30, 2020

I'm calling for an FCP. Please post all comments this next week; assuming no new blocking issues, this specification will be merged at 2020-11-06T17:00-0800 (2020-11-07T01:00Z) (i.e., at 5 pm next friday redmond time)

@strega-nil
Copy link
Contributor Author

I agree with @Neumann-A's assessment that the registry-path: "/foo/bar" is a bit of unfortunate magic. However, after discussing this with the rest of the team, we think that there are two real options for fixing this:

  1. We could use @Neumann-A's suggestion outright; this is pretty simple, but it would require figuring out what we should do with paths that are "weird", for example, "${base}foo, ${base}/../foo, or paths that aren't rooted at ${base}. As a part of this, base might also not be the best option.
  2. @BillyONeal suggested "$ as root", i.e., $/foo, and requiring paths to be rooted there. This fixes all of the issues with "weird paths" from 1, since we'd just disallow all of those kinds of paths.

I'd like to take input from the community. If you think that option 1 is better, please respond to this message with 🚀 ; if you think that option 2 is better, please respond to this message with 🎉 . If you have more complex thoughts, please respond in a reply :)

We should first copy the existing implementation to a new folder:

```sh
$ cp -r ports/a-/asmjit/2020-07-22 ports/a-/asmjit/2020-10-08
Copy link
Contributor

Choose a reason for hiding this comment

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

Do you think it would be a good idea to add an option to the vcpkg add-port command so that this part is done "automatically" for us? Something like

  1. vcpkg add-port ./ports/a-/asmjit/2020-10-08 --base ports/a-/asmjit/2020-07-22 --port-type registry-path
  2. Make the edits required to ports/a-/asmjit/2020-10-08 to update to latest.

This would remove a manual manipulation, and it prevents repeating ports/a-/asmjit/2020-10-08 twice, removing at the same time an opportunity to make a typo. 🙂

unfortunately without all the history because I really screwed up the git commands

This RFC is the new state of the world with regard to our plan for registries; it is very different from the old RFC. It includes registry databases, which are how one describes the set of versions of ports that one has access to. It also includes the specification for git registries, and updates the specification for filesystem registries with these new registry databases.

Since this RFC completely changes how registries work, the existing implementation will be broken.
Comment on lines 112 to 113
"abseil": { "version-string": "2020-03-03" },
"zlib": { "version-string": "1.2.11", "port-version": 9 }
Copy link
Member

Choose a reason for hiding this comment

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

I think we should make this a generic version field that does not imply any kind of scheme.

I would suggest "version" but it is kind of unfortunate that it overlaps with the "Relaxed" scheme.

"abseil": { "version": "2020-03-03" },
"zlib": { "version": "1.2.11", "port-version": 9 }

Another suggestion would be "version-text"

"abseil": { "version-text": "2020-03-03" }
"zlib": { "version-text": "1.2.11", "port-version": 9 }

Or we could change the spec for versioning so that "version" does not imply relaxed and instead make it explicit "version-relaxed".

Comment on lines +137 to +138
"version-string": "1.12.7",
"git-tree": "466e96fd2e17dd2453aa31dc0bc61bdcf53e7f61",
Copy link
Member

Choose a reason for hiding this comment

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

Same as with baselines use a generic version field.

{
  "version": "1.12.7",
  "git-tree": "466e96fd2e17dd2453aa31dc0bc61bdcf53e7f61"
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This definitely shouldn't use a generic field; there's no other place to grab the version scheme from.

strega-nil added a commit to strega-nil/vcpkg that referenced this pull request Dec 14, 2020
This PR merges the Registries changes and the versioning changes, so that one can use both at the same time.

There is one major difference between this PR and the RFC (microsoft#13590), which is that instead of version files looking like:

```json
[
  ...
]
```

version files look like:

```
{
  "versions": [
    ...
  ]
}
```

this is to support interop between this PR and existing demos and the like;
fixing this, along with perhaps renaming `port_versions` to `port-versions` should be done after this is merged,
should be a trivial change.
strega-nil added a commit that referenced this pull request Dec 21, 2020
* [vcpkg registries] support versions

This PR merges the Registries changes and the versioning changes, so that one can use both at the same time.

There is one major difference between this PR and the RFC (#13590), which is that instead of version files looking like:

```json
[
  ...
]
```

version files look like:

```
{
  "versions": [
    ...
  ]
}
```

this is to support interop between this PR and existing demos and the like;
fixing this, along with perhaps renaming `port_versions` to `port-versions` should be done after this is merged,
should be a trivial change.
ryukw7 pushed a commit to ryukw7/vcpkg that referenced this pull request Dec 24, 2020
* [vcpkg registries] support versions

This PR merges the Registries changes and the versioning changes, so that one can use both at the same time.

There is one major difference between this PR and the RFC (microsoft#13590), which is that instead of version files looking like:

```json
[
  ...
]
```

version files look like:

```
{
  "versions": [
    ...
  ]
}
```

this is to support interop between this PR and existing demos and the like;
fixing this, along with perhaps renaming `port_versions` to `port-versions` should be done after this is merged,
should be a trivial change.
@BillyONeal
Copy link
Member

@strega-nil Given that this feature has now landed, shouldn't we merge this RFC?

@strega-nil
Copy link
Contributor Author

@BillyONeal yes.

@strega-nil strega-nil merged commit f226416 into microsoft:master Feb 3, 2021
@strega-nil strega-nil deleted the git-registries branch February 11, 2021 21:53
strega-nil added a commit to strega-nil/vcpkg that referenced this pull request May 5, 2021
* [vcpkg registries] support versions

This PR merges the Registries changes and the versioning changes, so that one can use both at the same time.

There is one major difference between this PR and the RFC (microsoft#13590), which is that instead of version files looking like:

```json
[
  ...
]
```

version files look like:

```
{
  "versions": [
    ...
  ]
}
```

this is to support interop between this PR and existing demos and the like;
fixing this, along with perhaps renaming `port_versions` to `port-versions` should be done after this is merged,
should be a trivial change.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:vcpkg-feature The issue is a new capability of the tool that doesn’t already exist and we haven’t committed info:internal This PR or Issue was filed by the vcpkg team.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants