Skip to content
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

How to run language experiments with WebStorm? #36634

Open
mnordine opened this Issue Apr 15, 2019 · 7 comments

Comments

Projects
None yet
6 participants
@mnordine
Copy link

mnordine commented Apr 15, 2019

Screen Shot 2019-04-14 at 6 42 47 PM

How do you pass in flags to enable language experiments?

@mnordine

This comment has been minimized.

Copy link
Author

mnordine commented Apr 15, 2019

I see from https://github.com/dart-lang/sdk/blob/master/docs/process/experimental-flags.md that you can enable them easily from the analysis_options.yaml file, but I'm not sure how to run DDC or Dart2JS with them

@sigmundch

This comment has been minimized.

Copy link
Member

sigmundch commented Apr 15, 2019

dart2js accepts --enable-experiment=experiment_name on the command-line, I believe DDC does too, but I'm not familiar with how to adjust the launch commands in webstorm to provide it.

@jwren do you have pointers to guide our users on this?

@mnordine

This comment has been minimized.

Copy link
Author

mnordine commented Apr 15, 2019

I think you can set up a build.yaml file, and have something like:

targets:
  $default:
    sources:
      {"exclude" : ["bin/**"]}
    builders:
      build_web_compilers|entrypoint:
        generate_for:
          - web/main.dart
        dev_options:
          compiler: dartdevc
        release_options:
          compiler: dart2js
          dart2js_args:
           # See https://webdev.dartlang.org/tools/dart2js#size-and-speed-options
           # - --dump-info
            - --fast-startup
            - --minify
            - --no-frequency-based-minification
            - --no-source-maps
            - --show-package-warnings
            - --trust-primitives
            - --omit-implicit-checks

Maybe experiment flags work there for dart2js_args? What is the key for DDC? ddc_args?

Or maybe there's a better way to set this up, but I'm not seeing it?

@jwren

This comment has been minimized.

Copy link
Member

jwren commented Apr 15, 2019

This is correct, the Dart plugin doesn't know anything about dart2js or ddc, it simply knows how to start webdev serve.

@kevmoo for directions on appropriate files/ build.yaml file needed changes for webdev flags.

@kevmoo

This comment has been minimized.

Copy link
Member

kevmoo commented Apr 15, 2019

There is no way AFAIK to provide flags to DDC via `build.yaml.

@jakemac53 @natebosch ?

Might be worth filing an issue https://github.com/dart-lang/build/issues/new

@natebosch

This comment has been minimized.

Copy link
Member

natebosch commented Apr 15, 2019

There is no way currently to pass args to DDC. We could consider allowing arguments, but the UX will not be great because they can't be passed to the entrypoint builder, they'd need to be configured in a different place with global options.

@mnordine

This comment has been minimized.

Copy link
Author

mnordine commented Apr 16, 2019

How does the Dart team test new language features with DDC and dart2js?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.