-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
Add dart_executable gn rule #52241
base: main
Are you sure you want to change the base?
Add dart_executable gn rule #52241
Conversation
612f2e2
to
41a5400
Compare
args = [] | ||
metadata = { | ||
action_type = [ "dart_executable" ] | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll need to send a patch upstream to copy this over onto the underlying action
target in the dart_action
template.
fc7ba2c
to
827f0a2
Compare
} | ||
|
||
abs_output = rebase_path(output) | ||
exe_vm_args += [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know how it's spelled, but we'll want to pass the flag here that disables analytics/telemetry.
|
||
abs_output = rebase_path(output) | ||
exe_vm_args += [ | ||
"compile", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does dart compile exe
run pub
? If so, we'll need a way to keep it from touching the network.
Does dart compile exe
have a flag that causes it to dump a depfile like flutter_frontend_server does? See https://github.com/flutter/engine/blob/main/build/dart/rules.gni#L71. Without that, GN won't do dependency tracking correctly. You might be able to see that in this PR by editing et
source files, and seeing that rebuilds might not happen when you need them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does dart compile exe run pub?
That's a good question. I haven't looked at the implementation. My guess is probably, which we should avoid. Will take a look.
Does dart compile exe have a flag that causes it to dump a depfile like flutter_frontend_server does?
Not one that's documented (even with -v -v
set). This patch is still a draft experiment to test the general concept/tool integration. It should work even if we swap out the implementation with an invocation of dart_snapshot
(wrapped with a launch script) instead, that approach does support --depfile
(and is already implemented above). Will play with that a little.
# | ||
# deps (optional): | ||
# Additional dependencies. Dependencies on the frontend server and | ||
# Flutter's platform.dill are included by default. This rule creates and |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't create a depfile as written =)
Adds a dart_executable rule that compiles Dart code to an ELF, Mach-O, or PE binary. Can be used to build tools written in Dart, or Dart unit tests. Issue: flutter/flutter#147013
827f0a2
to
07b54c5
Compare
Adds a dart_executable rule that compiles Dart code to an ELF, Mach-O, or PE binary. Can be used to build tools written in Dart, or Dart unit tests.
Issue: flutter/flutter#147013
Pre-launch Checklist
///
).If you need help, consider asking for advice on the #hackers-new channel on Discord.