Skip to content

Clarify "default" feature#298

Merged
ras0219-msft merged 10 commits intomicrosoft:mainfrom
ras0219-msft:dev/roschuma/fullpkgspec
Jan 10, 2022
Merged

Clarify "default" feature#298
ras0219-msft merged 10 commits intomicrosoft:mainfrom
ras0219-msft:dev/roschuma/fullpkgspec

Conversation

@ras0219-msft
Copy link
Collaborator

This PR extracts out core refactoring exposed by #295. Specifically, this PR seeks to clarify where in the code we are using "parsed-notation" (no features implies defaults, [core] implies not defaults) versus internal notation ([default] implies defaults).

The primary change to accomplish this is the introduction of struct InternalFeatureSet : std::vector<std::string> to denote when this handoff occurs. By type:

  • Dependency is parse-notation
  • ParsedQualifiedSpecifier is parse-notation
  • FullPackageSpec is internal-notation
  • FeatureSpec is internal-notation

Therefore, the core conversions to internal notation happen as part of Dependency::to_full_spec() and ParsedQualifiedSpecifier::to_full_spec() (shared via normalize_feature_list()). filter_dependencies() uses Dependency::to_full_spec().

@ras0219-msft
Copy link
Collaborator Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

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.

That's what I see for now, mostly looks good and I like the clarification.

@ras0219-msft
Copy link
Collaborator Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

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 stuff, but mostly looks really good! Thanks @ras0219-msft!

@ras0219-msft ras0219-msft force-pushed the dev/roschuma/fullpkgspec branch from 0a5af2c to 81bf32f Compare January 6, 2022 19:21
@ras0219-msft ras0219-msft force-pushed the dev/roschuma/fullpkgspec branch from c787df0 to 5ba94ea Compare January 6, 2022 23:37
@ras0219-msft ras0219-msft merged commit 68293cc into microsoft:main Jan 10, 2022
@ras0219-msft ras0219-msft deleted the dev/roschuma/fullpkgspec branch January 10, 2022 22:22
ras0219-msft added a commit to ras0219-msft/vcpkg-tool that referenced this pull request Jan 24, 2022
PR microsoft#298 introduced a regression during ABI calculation for packages
that do not have features. It removed the implicit entry "core"
from InstallPlanAction::feature_list, which meant that packages
without features would end up with an empty ABI tag for their
features list.

We consider an empty ABI tag in the features list to indicate that
a value could not be calculated and therefore that the package
cannot be cached (no ABI). This then resulted in a crash during CI
which assumes that all packages have ABIs.
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.

2 participants