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] add command init-registry #52

Merged
merged 5 commits into from
Jun 2, 2021

Conversation

autoantwort
Copy link
Contributor

The next step is to support x-add-version in registries.

@autoantwort autoantwort force-pushed the init-registry branch 2 times, most recently from 0ba05fc to cb1518a Compare April 11, 2021 21:51
@autoantwort
Copy link
Contributor Author

For x-add-version I see two possibilities:

  1. Make x-add-version a BasicCommand and determine the ports and versions dir inside of perform_and_exit, but this is maybe a bad idea because you also want to check --x-builtin-ports-root and --x-builtin-registry-versions-dir and you maybe also want to change other commands so that they word in registries (vcpkg edit/create)
  2. Add a new class VcpkgBasePaths that contains the .git, ports and the versions folder, but not the rest of VcpkgPaths and remove the paths of VcpkgBasePaths from VcpkgPaths. Add than a new command category BasePathsCommand.

I think the second solution is cleaner, but I don't want to implement something and have to change everything later. So which version do you prefer (or maybe you have another idea how to solve this)?

src/vcpkg/commands.cpp Outdated Show resolved Hide resolved
src/vcpkg/vcpkgcmdarguments.cpp Outdated Show resolved Hide resolved
src/vcpkg/commands.init-registry.cpp Outdated Show resolved Hide resolved
@autoantwort
Copy link
Contributor Author

I have now finally implemented your suggestions.

@autoantwort
Copy link
Contributor Author

For x-add-version I see two possibilities:

  1. Make x-add-version a BasicCommand and determine the ports and versions dir inside of perform_and_exit, but this is maybe a bad idea because you also want to check --x-builtin-ports-root and --x-builtin-registry-versions-dir and you maybe also want to change other commands so that they word in registries (vcpkg edit/create)

  2. Add a new class VcpkgBasePaths that contains the .git, ports and the versions folder, but not the rest of VcpkgPaths and remove the paths of VcpkgBasePaths from VcpkgPaths. Add than a new command category BasePathsCommand.

I think the second solution is cleaner, but I don't want to implement something and have to change everything later. So which version do you prefer (or maybe you have another idea how to solve this)?

Any opinion about this @strega-nil @ras0219-msft ?

@autoantwort
Copy link
Contributor Author

autoantwort commented May 22, 2021

@strega-nil-ms ping
It is finished now

Copy link
Contributor

@strega-nil-ms strega-nil-ms left a comment

Choose a reason for hiding this comment

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

minor changes

you'll also need to take a VcpkgPaths&.

src/vcpkg/commands.cpp Outdated Show resolved Hide resolved
src/vcpkg/commands.cpp Outdated Show resolved Hide resolved
src/vcpkg/commands.init-registry.cpp Show resolved Hide resolved
src/vcpkg/commands.init-registry.cpp Outdated Show resolved Hide resolved
src/vcpkg/commands.init-registry.cpp Outdated Show resolved Hide resolved
autoantwort and others added 2 commits June 2, 2021 22:48
Co-authored-by: nicole mazzuca <83086508+strega-nil-ms@users.noreply.github.com>
Copy link
Contributor

@strega-nil-ms strega-nil-ms left a comment

Choose a reason for hiding this comment

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

Thanks so much @autoantwort :)

@strega-nil-ms strega-nil-ms merged commit b5832d3 into microsoft:main Jun 2, 2021
@Neumann-A
Copy link
Contributor

So I used:
./vcpkg.exe x-init-registry ../my-vcpkg-ports/
and
./vcpkg.exe x-add-version --all --overlay-ports=../my-vcpkg-ports/ --x-builtin-registry-versions-dir=../my-vcpkg-ports/versions/ --x-builtin-ports-root=../my-vcpkg-ports/

What I observed:
Having the ports directory being generated by ./vcpkg.exe x-init-registry ../my-vcpkg-ports/ is unnecessary.

@autoantwort autoantwort deleted the init-registry branch September 4, 2021 15:19
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.

5 participants