Repository navigation
Closed
Description
Expanding this comment out to its own issue: #3016 (comment)
Project loading + building has it's own schema:
Lines 37 to 94 in 9bbbf84
| func (s *projectSchema) Schema() string { | |
| return ` | |
| "A set of scripts and/or extensions" | |
| type Project { | |
| "name of the project" | |
| name: String! | |
| "schema provided by the project" | |
| schema: String | |
| "extensions in this project" | |
| extensions: [Extension!] | |
| "scripts in this project" | |
| scripts: [Script!] | |
| "other projects with schema this project depends on" | |
| dependencies: [Project!] | |
| "install the project's schema" | |
| install: Boolean! | |
| "Code files generated by the SDKs in the project" | |
| generatedCode: Filesystem! | |
| } | |
| "A schema extension provided by a project" | |
| type Extension { | |
| "path to the extension's code within the project's filesystem" | |
| path: String! | |
| "schema contributed to the project by this extension" | |
| schema: String! | |
| "sdk used to generate code for and/or execute this extension" | |
| sdk: String! | |
| } | |
| "An executable script that uses the project's dependencies and/or extensions" | |
| type Script { | |
| "path to the script's code within the project's filesystem" | |
| path: String! | |
| "sdk used to generate code for and/or execute this script" | |
| sdk: String! | |
| } | |
| extend type Filesystem { | |
| "load a project's metadata" | |
| loadProject(configPath: String!): Project! | |
| } | |
| extend type Core { | |
| "Look up a project by name" | |
| project(name: String!): Project! | |
| } | |
| ` | |
| } |
It is only used internally (not meant to be used by users directly yet) but it nonetheless needs to be integrated with the new API (i.e. Directory/Container/etc.). At minimum, this is needed so we can delete the old Filesystem code, but it will also be good to rethink the design at this time too.
Reacted by Miranda Carter
Metadata
Metadata
Assignees
Labels
area/engineAbout dagger core engine
Activity
sipsma commentedon Oct 5, 2022
This may actually just be a matter of removing this from the "public" schema and only supporting this internally, with dagger.gql contents provided as a header. We may still model this as an API if convenient but it should not be exposed directly to users.
sipsma commentedon Oct 5, 2022
Also, note to self, be sure to try not to break the existing mechanism for all this if feasible and if cloud work relies on any of it.
vito commentedon Oct 12, 2022
Update: the project schema has been updated, slightly, via the above PR - but it still uses LLB directly and returns a
*core.Directory. It should instead return a*core.Container, so this issue is still valid. Some context here: #3304 (comment)sipsma commentedon Dec 6, 2022
I think updating the schema to not use Filesystem is good enough for this issue. Any future changes to the internal code can be tracked separately. Closing