Skip to content

Add "secret" compiler options to allow dart2js and pub to communicate names of output files to compiler API #17259

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
peter-ahe-google opened this issue Mar 4, 2014 · 4 comments
Assignees
Labels
P1 A high priority bug; for example, a single project is unusable or has many test failures web-dart2js

Comments

@peter-ahe-google
Copy link
Contributor

Problem:

To enable sources maps, you need to append the name of the source map file to the generated output from dart2js (out.js or out.dart by default).

The compiler API (sdk/lib/_internal/compiler/compiler.dart) isn't aware of the these names, so it cannot append these tags. So the names are appended by the dart2js command-line wrapper (sdk/lib/_internal/compiler/implementation/dart2js.dart).

This means that pub (and any other client of the compiler API) has to duplicate this logic.

Possible solutions:

  1. My preferred long-term solution is to change the compiler API (issue Compiler API is not aware of URI of output and cannot add sourceMappingURL #15607).
  2. Add "secret" options to the compiler API (more options can be easily added as the interface is a list of strings). These secret options are never used from the command line but can inform the compiler API about the location of certain files. This bug report is a suggestion to implement this, as I believe changing the compiler API is a longer-term effort.
@peter-ahe-google
Copy link
Contributor Author

Marked this as blocking #15563.

@floitschG
Copy link
Contributor

Set owner to @johnniwinther.
Removed Priority-Unassigned label.
Added Priority-High label.

@johnniwinther
Copy link
Member

Added Started label.

@johnniwinther
Copy link
Member

Fixed by https://codereview.chromium.org/189563004/


Added Fixed label.

@peter-ahe-google peter-ahe-google added Type-Defect P1 A high priority bug; for example, a single project is unusable or has many test failures web-dart2js labels Mar 10, 2014
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P1 A high priority bug; for example, a single project is unusable or has many test failures web-dart2js
Projects
None yet
Development

No branches or pull requests

3 participants