Skip to content

Add additional functions to pkggraph.go#6368

Merged
dmcilvaney merged 9 commits intomicrosoft:mainfrom
dmcilvaney:damcilva/2.0/tools/delta/optimize_implicits_parts/pkggraph_funcs
Nov 28, 2023
Merged

Add additional functions to pkggraph.go#6368
dmcilvaney merged 9 commits intomicrosoft:mainfrom
dmcilvaney:damcilva/2.0/tools/delta/optimize_implicits_parts/pkggraph_funcs

Conversation

@dmcilvaney
Copy link
Copy Markdown
Contributor

@dmcilvaney dmcilvaney commented Oct 9, 2023

Merge Checklist

All boxes should be checked before merging the PR (just tick any boxes which don't apply to this PR)

  • The toolchain has been rebuilt successfully (or no changes were made to it)
  • The toolchain/worker package manifests are up-to-date
  • Any updated packages successfully build (or no packages were changed)
  • Packages depending on static components modified in this PR (Golang, *-static subpackages, etc.) have had their Release tag incremented.
  • Package tests (%check section) have been verified with RUN_CHECK=y for existing SPEC files, or added to new SPEC files
  • All package sources are available
  • cgmanifest files are up-to-date and sorted (./cgmanifest.json, ./toolkit/scripts/toolchain/cgmanifest.json, .github/workflows/cgmanifest.json)
  • LICENSE-MAP files are up-to-date (./SPECS/LICENSES-AND-NOTICES/data/licenses.json, ./SPECS/LICENSES-AND-NOTICES/LICENSES-MAP.md, ./SPECS/LICENSES-AND-NOTICES/LICENSE-EXCEPTIONS.PHOTON)
  • All source files have up-to-date hashes in the *.signatures.json files
  • sudo make go-tidy-all and sudo make go-test-coverage pass
  • Documentation has been updated to match any changes to the build system
  • Ready to merge

Summary

In preparation for an implicit provides optimization PR (RFC/PoC: #6298), add a couple of functions to pkgraph:

  • HasNode(): Returns true if a specific node object is present in a graph, the node must point to the same underlying object, equivalence is not sufficient.
  • AllImplicitNodes(): Like the other All*Nodes(): returns a list of all run/remote nodes in the graph that have n.Implicit == true
  • AddGoalNodeToNodes(): Creates a goal node that links to arbitrary node objects in the graph rather than package versions.
Change Log
  • Add HasNode() AllImplicitNodes() AddGoalNodeToNodes()
Does this affect the toolchain?

NO

Test Methodology
  • Local

@microsoft-github-policy-service microsoft-github-policy-service Bot added the main PR Destined for main label Oct 9, 2023
@dmcilvaney
Copy link
Copy Markdown
Contributor Author

Needs rebase on top of #5798 once merged

HasNode(), AllImplicitNodes(), AddGoalNodeFromNodes()
@dmcilvaney dmcilvaney force-pushed the damcilva/2.0/tools/delta/optimize_implicits_parts/pkggraph_funcs branch from 5b22466 to 47c5a49 Compare November 10, 2023 18:48
@dmcilvaney dmcilvaney marked this pull request as ready for review November 10, 2023 19:03
@dmcilvaney dmcilvaney requested a review from a team as a code owner November 10, 2023 19:03
Comment thread toolkit/tools/internal/pkggraph/pkggraph_test.go
Comment thread toolkit/tools/internal/pkggraph/pkggraph.go
Comment thread toolkit/tools/internal/pkggraph/pkggraph.go
Comment thread toolkit/tools/internal/pkggraph/pkggraph.go Outdated
@dmcilvaney dmcilvaney merged commit 81e0c43 into microsoft:main Nov 28, 2023
gmileka pushed a commit that referenced this pull request Dec 7, 2023
dmcilvaney added a commit to dmcilvaney/CBL-Mariner that referenced this pull request Dec 14, 2023
dmcilvaney added a commit to dmcilvaney/CBL-Mariner that referenced this pull request Dec 14, 2023
dmcilvaney added a commit to dmcilvaney/CBL-Mariner that referenced this pull request Dec 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

main PR Destined for main Tools

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants