Is it possible to access a pending project graph from a generator before exiting to the write phase? #29015
Unanswered
iAmNathanJ
asked this question in
Questions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Using local generators, I have a scenario that seems to require multi-pass generation. In this case, two generators.
The first generator creates new (or updates existing) project.json files based on glob patterns that describe project boundaries across an entire repo.
The second generator applies specific targets to each project based on the result of
createProjectFileMapUsingProjectGraph(await createProjectGraphAsync())
.Currently, I need to run the second generator after the files have been written from the first generator. I'm using the file-map because it already associates ownership of each source file to a given project and importantly it accounts for nested projects.
I'd like to compose these two generators into one, but it seems that I cannot access the pending project graph in memory before exiting the first generator.
Is it possible to somehow compute a new project graph before writing files to disk?
Beta Was this translation helpful? Give feedback.
All reactions