-
Notifications
You must be signed in to change notification settings - Fork 296
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
Implement 'new' in C++. #613
Conversation
Most callers were just default-initializing JsonStyle which is equivalent to the WithSpaces(2) form. WithSpaces(2) and default-initialized changed to call the new overload(s). Callers who were stringifying 2 Json entities just to compare their strings also dropped the style parameter. Callers who were using anything else were left alone.
This replaces the TypeScript implementation of new with a C++ one. Other changes: * Now creates both vcpkg.json and vcpkg-configuration.json, which resolves "vcpkg new does not create vcpkg.json" https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1494967 * vcpkg-configuration.json can be embedded into vcpkg.json with --single-file. * Now fills in the default registry with the current baseline git SHA. * --name and --version are now mandatory since we are creating vcpkg.json, but they can be skipped with --application as per microsoft#605
bool option_version_relaxed, | ||
bool option_version_date, | ||
bool option_version_string) | ||
{ |
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 is just personal preference, but the function could be easier to digest if it were split into smaller chunks for each option and just pass the manifest as an argument.
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.
I'm not sure I understand: the manifest is the return value? Can you show the declarations you'd be looking for?
# Conflicts: # src/vcpkg/commands.add.cpp
# Conflicts: # include/vcpkg/base/messages.h # locales/messages.en.json
This replaces the TypeScript implementation of new with a C++ one. Other changes: