Skip to content

Clarify "default" feature - #298

Merged
Robert Schumacher (ras0219-msft) merged 10 commits into
microsoft:mainfrom
ras0219-msft:dev/roschuma/fullpkgspec
Jan 10, 2022
Merged

Clarify "default" feature#298
Robert Schumacher (ras0219-msft) merged 10 commits into
microsoft:mainfrom
ras0219-msft:dev/roschuma/fullpkgspec

Conversation

@ras0219-msft

Copy link
Copy Markdown
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
Copy Markdown
Collaborator Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@strega-nil-ms nicole mazzuca (strega-nil-ms) left a comment

Copy link
Copy Markdown
Contributor

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.

Comment thread include/vcpkg/base/expected.h
Comment thread include/vcpkg/base/expected.h Outdated
Comment thread include/vcpkg/base/expected.h Outdated
Comment thread include/vcpkg/packagespec.h
Comment thread include/vcpkg/packagespec.h Outdated
Comment thread include/vcpkg/packagespec.h Outdated
@ras0219-msft

Copy link
Copy Markdown
Collaborator Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Copy Markdown
Contributor

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 Robert Schumacher (@ras0219-msft)!

Comment thread include/vcpkg/packagespec.h Outdated
Comment thread include/vcpkg/packagespec.h Outdated
Comment thread include/vcpkg/packagespec.h Outdated
Comment thread src/vcpkg/packagespec.cpp Outdated
@ras0219-msft
Robert Schumacher (ras0219-msft) merged commit 68293cc into microsoft:main Jan 10, 2022
@ras0219-msft
Robert Schumacher (ras0219-msft) deleted the dev/roschuma/fullpkgspec branch January 10, 2022 22:22
Robert Schumacher (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