Skip to content

Provide a command to invoke DDC in a build context #538

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
nex3 opened this issue Oct 24, 2017 · 2 comments
Closed

Provide a command to invoke DDC in a build context #538

nex3 opened this issue Oct 24, 2017 · 2 comments
Labels
type-enhancement A request for a change that isn't a bug

Comments

@nex3
Copy link
Member

nex3 commented Oct 24, 2017

It would be useful for tooling to be able to invoke DDC in the context of the build output, using the user's configuration as well as any cached modules that may already exist. I'm imagining something as simple as: pub run build dartdevc $args, where $args are the same arguments that dartdevc normally supports. This would behave like a normal dartdevc invocation, except that:

  • package: URLs are resolved using the same scheme as the package it's invoked in, regardless of where the entrypoint is.

  • Any package: imports or imports from the entrypoint package use modules and summaries from the build cache rather than being recompiled from scratch.

This would make it easy for tools to integrate with build's infrastructure without requiring users to add build phases. The driving use case is test, which needs to generate a small amount of wrapper code in order to load a test file properly. If it could pass this wrapper file to DDC while having the modules it imports come from build, it would avoid doing unnecessary compilation while still being able to dynamically generate code as necessary.

This may not be possible until dart-lang/sdk#27262 is done.

@nex3 nex3 added the type-enhancement A request for a change that isn't a bug label Oct 24, 2017
@nex3
Copy link
Member Author

nex3 commented Oct 24, 2017

cc @jakemac53, who I talked about this with in person

@jakemac53
Copy link
Contributor

Afaik we are no longer planning on doing this, it would be harder than originally anticipated and we have solutions that work pretty reasonably today for testing.

We can re-evaluate if needed for test plugin support later on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

2 participants