Skip to content

[build] de-noise output: defer DART_HOME check until test execution#304

Draft
pq wants to merge 2 commits intoflutter:mainfrom
pq:build_defer_DART_HOME_check
Draft

[build] de-noise output: defer DART_HOME check until test execution#304
pq wants to merge 2 commits intoflutter:mainfrom
pq:build_defer_DART_HOME_check

Conversation

@pq
Copy link
Copy Markdown
Collaborator

@pq pq commented Apr 1, 2026

The DART_HOME check was happening eagerly during the configuration step which a spam warning when building the plugin. This fixes that.

Warning for Tests

☁  third_party [main] ⚡  ./gradlew :test --tests "com.jetbrains.dart.analysisServer.*"
Calculating task graph as no cached configuration is available for tasks: :test --tests com.jetbrains.dart.analysisServer.*

> Configure project :
plugin version: valueof(GradlePropertyValueSource)
ideaVersion: extension 'ideaVersion'
Following 1 plugins could not be created: plugins/fullLine/lib/modules/intellij.fullLine.yaml.jar

> Task :compileTestJava
Note: /Users/pquitslund/src/repos/dart-intellij-third-party/third_party/src/test/java/com/jetbrains/dart/analysisServer/DartServerHighlightingTest.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: /Users/pquitslund/src/repos/dart-intellij-third-party/third_party/src/test/java/com/jetbrains/lang/dart/highlighting/DartHighlightingTest.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

> Task :test
DART_HOME environment variable is not set. Dart Analysis Server tests will fail.

Not for Buiilds

☁  third_party [build_fixProdVersion] ⚡  ./gradlew buildPlugin -Pdev
Calculating task graph as configuration cache cannot be reused because the set of Gradle properties has changed: 'dev' was added.

> Configure project :
plugin version: 504.0.0-dev.20260331
ideaVersion: extension 'ideaVersion'
Following 1 plugins could not be created: plugins/fullLine/lib/modules/intellij.fullLine.yaml.jar

BUILD SUCCESSFUL in 5s
15 actionable tasks: 8 executed, 3 from cache, 4 up-to-date
Configuration cache entry stored.

  • I’ve reviewed the contributor guide and applied the relevant portions to this PR.
Contribution guidelines:

@pq pq requested a review from helin24 April 1, 2026 03:13
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request modifies the test task configuration in third_party/build.gradle.kts by wrapping the Dart SDK path validation and JVM argument setup within a doFirst block to ensure it only runs during task execution. A review comment points out that modifying task configuration inside doFirst is discouraged in modern Gradle because it interferes with the Configuration Cache and task up-to-date checks. The reviewer suggests using the providers API to lazily set the system property while keeping only the validation logging inside doFirst.

@pq pq marked this pull request as draft April 1, 2026 03:40
@pq
Copy link
Copy Markdown
Collaborator Author

pq commented Apr 1, 2026

WIP apparently!

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.

1 participant