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

[x-update-baseline] Initial implementation #341

Merged
merged 14 commits into from
Apr 19, 2022

Conversation

strega-nil
Copy link
Contributor

This is an initial, example implementation of vcpkg x-update-baseline; it is definitely incomplete, may be buggy, and could really use some progress messages

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.

(Not done reviewing yet.)

vicroms
vicroms previously requested changes Mar 9, 2022
@ras0219-msft ras0219-msft marked this pull request as draft April 1, 2022 21:30
@ras0219-msft
Copy link
Contributor

Moving to draft since there has been no update in >3wks

@strega-nil-ms strega-nil-ms marked this pull request as ready for review April 5, 2022 00:27
@strega-nil-ms
Copy link
Contributor

I believe that I've fixed the CRs for both Victor and Robert; can you rereview?

@strega-nil-ms
Copy link
Contributor

I'd also appreciate bikeshedding on the messages

* optional: make certain `get()` is only called when
  it won't result in a dangling pointer
* vcpkgpaths: remove JsonStyle support as it isn't used
* vcpkgpaths: switch from two functions returning
  Optional<Manifest> + Optional<Path>,
  to one function returning Optional<ManifestAndLocation>
* vcpkgpaths: add `get_configuration_and_location`
* get_latest_baseline -> configuration.cpp
* format
* optional - add see-through operator==
* add `--add-initial-baseline` option
* more correct if-elses
```
PS /../nimazzuc/projects/testproj> ../vcpkg-tool/build/vcpkg x-update-baseline --dry-run
registry 'https://github.com/microsoft/vcpkg' already up to date: 89295c9
registry '/a/b' not updated: default
registry 'https://foobar' not updated: default
warning: git failed to fetch remote repository https://foobar
Error: Failed to fetch ref HEAD from repository https://foobar.
fatal: unable to access 'https://foobar/': Could not resolve host: foobar
```
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.

Wow I'm surprised you did the wrapped expected thing but sounds good to me

@ras0219-msft
Copy link
Contributor

Still working on my review, please do not merge yet.

Copy link
Contributor

@ras0219-msft ras0219-msft left a comment

Choose a reason for hiding this comment

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

I've marked the comments provoking "request changes" with (* requesting changes *) -- my other review comments can be considered nits.

}
else if (kind == RegistryConfigDeserializer::KIND_BUILTIN)
{
return get_baseline_from_git_repo(paths, BUILTIN_GIT_URL);
Copy link
Contributor

Choose a reason for hiding this comment

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

This branch should get HEAD from the actual repo that will be used. This could mean https://github.com/Microsoft/vcpkg (if use_git_default_registry()), but it most likely means the local git repo.

Copy link
Contributor

Choose a reason for hiding this comment

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

(* requesting changes *)

Copy link
Contributor

Choose a reason for hiding this comment

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

I want to talk about this - I don't understand what this means.

Copy link
Contributor

Choose a reason for hiding this comment

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

My understanding is that having a builtin-baseline implies using a git builtin registry...

* registry_location -> pretty_location
* ManifestAndLocation -> ManifestAndPath
* ConfigurationAndLocation -> ConfigurationAndSource
@strega-nil-ms
Copy link
Contributor

@ras0219-msft I believe I did what you wanted?

@strega-nil-ms
Copy link
Contributor

Thanks for the approvals y'all!

@strega-nil-ms strega-nil-ms merged commit 1cf1f7f into microsoft:main Apr 19, 2022
@strega-nil-ms strega-nil-ms deleted the update-manifest branch April 19, 2022 20:05
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