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

Implement downloads from json file #2

Draft
wants to merge 141 commits into
base: dev
Choose a base branch
from

Conversation

Thomas1664
Copy link

@Thomas1664 Thomas1664 commented Apr 2, 2024

Fixes open-vcpkg/meta#6

See the linked issue for more information.

Benefits

  • Simplified SBOM generation
  • Better experience when installing ports using --only-downloads
  • More localization
  • Better performance during download

Changes in behavior

Applying patches

All patches are now applied within a single git command. Because the output from stdout is always empty, all logs are saved into a single file.


r.optional_object_field(obj, "patches", result.patches, Json::IdentifierArrayDeserializer::instance);

result.urls.emplace_back(fmt::format("https://api.{}/repos/{}/tarball/{}", gh_gost, repo, ref));
Copy link
Author

Choose a reason for hiding this comment

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

I decided to build the URL here in order to unify and simplify DownloadedFile for all downloading methods.

Optional<type> visit_object(Json::Reader& r, const Json::Object& obj) const override
{
DownloadedFile result;
if (auto value = obj.get("github"))
Copy link
Author

Choose a reason for hiding this comment

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

Using this instead of the id as keys simplifies parsing a lot.

Thomas1664 and others added 20 commits April 2, 2024 15:26
Hopefully fixes: microsoft/vcpkg#37842

Special thanks to @TrueBrain for figuring out the actual problem in microsoft#1378

Co-authored-by: Patric Stout <[email protected]>
* should be forward slashes

* add script to check for unused messages

* add messages check to pr workflow

* error if unused messages

* dont print every message every time

* remove bogus comment

* remove bogus comment

* remove bogus comment (again)

* Remove timer; add word boundry to regex;merge format and very messages job in pr.yaml

* Use JSON files instead of REGEX to declare messages

* pass artifact messages as argument

* filter out empty from unused messages

* filter out empty from unused messages

* infer path from PSScriptRoot; reuse configure in format job

* remove unused messages

* add new line at the end of ps script

* remove unused messages

* try something

* add messages.json again

---------

Co-authored-by: Javier Matos <[email protected]>
Co-authored-by: Javier Matos <[email protected]>
Problems were:
- the only test in e2e_ports folder, everything else in e2e-ports
- tests modify files under $VCPKG_ROOT
- Divided in two files where one enough
- Tests fail if package is already in binary cache
…ft#1367)

In microsoft/vcpkg#37563 (comment) we have an example of versions which meet the semantic versioning format but don't sort like semantic versions, so the message:

```console
PS D:\vcpkg> .\vcpkg.exe x-add-version sqlite-modern-cpp
Use the version scheme "version" rather than "version-string" in port "sqlite-modern-cpp".
Use --skip-version-format-check to disable this check.
```

is too strong. We need to explain to the user that they should only do that if the versions actually are intended to sort that way.
BillyONeal and others added 30 commits August 1, 2024 00:04
…f67865ee/_build?definitionId=17772 by using baselines generated in https://dev.azure.com/devdiv/0bdbc590-a062-4c3f-b0f6-9383f67865ee/_build/results?buildId=10125589 (microsoft#1484)

Co-authored-by: microsoft-github-policy-service[bot] <77245923+microsoft-github-policy-service[bot]@users.noreply.github.com>
…soft#1489)

Resolves a recent concern raised internally where tar.exe failed with some exit code that was larger than INT_MAX which got smashed by:

https://github.com/microsoft/vcpkg-tool/blob/ee9a2545111704c900b164680b98391f1bf78c59/src/vcpkg/base/system.process.cpp#L1426
* first take, use 7zr to unpack 7za instead of cmake, remove cmake dance

* fix merge issues

* fix unit tests

* update vcpkg-scripts-sha.txt

* update vcpkg-scripts-sha.txt

* fix self extracting

* use 7zr for zip formats as well

* undo zip

* use cmake for tar since 7zr needs to unpack twice for .tar.gz

* undo changes to tar

* use cmake for tar decompression

* update vcpkg-scripts-sha

* Make the upgrade test always use the current vcpkgTools.xml.

* use 7zr for zip

* 7zr doesn't work on zip formats

---------

Co-authored-by: Javier Matos <[email protected]>
Co-authored-by: Billy Robert O'Neal III <[email protected]>
std::array is actually not that cheap to compile and we did not really need it in these cases. ( https://raw.githubusercontent.com/ned14/stl-header-heft/master/graphs/msvs-2019.png )
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.