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

Add --watch to _macro_tool for analyzer. #99

Merged
merged 1 commit into from
Oct 11, 2024

Conversation

davidmorgan
Copy link
Contributor

So we get a first idea where we are w.r.t. performance #94.

I'm a little surprised the analyzer integration already works for changes to the script file, since we didn't test that :) as far as I can tell it just sends additional AugmentationRequest instances to the macro, no rebuild/relaunch of the macro.

I am not surprised that it looks fairly slow right now :) 2.7 seconds for a rerun+reanalyze of json_codable_test.dart.

dart ~/git/macros/pkgs/_macro_tool/bin/main.dart --workspace=. --packageConfig=../../.dart_tool/package_config.json --script=lib/json_codable_test.dart --host=analyzer --watch
Running json_codable_test.dart with macros on analyzer.
~~~
Package config: /usr/local/google/home/davidmorgan/git/macros/.dart_tool/package_config.json
Workspace: /usr/local/google/home/davidmorgan/git/macros/goldens/foo
Script: /usr/local/google/home/davidmorgan/git/macros/goldens/foo/lib/json_codable_test.dart
Resolved in 9734ms.
Macro output (patched to use augment library): /usr/local/google/home/davidmorgan/git/macros/goldens/foo/lib/json_codable_test.dart.macro_tool_output
Running with --watch, waiting for next change to script.
Script changed, rerunning macro.
Resolved in 2775ms.
Macro output (patched to use augment library): /usr/local/google/home/davidmorgan/git/macros/goldens/foo/lib/json_codable_test.dart.macro_tool_output
Running with --watch, waiting for next change to script.
Script changed, rerunning macro.
Resolved in 2705ms.

@davidmorgan davidmorgan merged commit a482288 into dart-lang:main Oct 11, 2024
45 checks passed
@davidmorgan davidmorgan deleted the macro-tool-watch branch October 11, 2024 14:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants