-
Notifications
You must be signed in to change notification settings - Fork 100
fix: refresh now surfaces externally-generated files in new pakages #1026
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
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
2911ddf
Fix #914: refresh now surfaces externally-generated files in new pack…
wenytang-ms 24157ed
test: make #914 E2E assertions deterministic to fix CI false negatives
wenytang-ms cf41b6d
test: drop LLM verify on file-write/refresh steps and trim comments (…
wenytang-ms cb0a2c8
test: add deterministic negative baseline to #914 plans
wenytang-ms 37638d6
fix: address PR review - restore syncPaths on failure, dedup refresh …
wenytang-ms File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,105 @@ | ||
| # Validates the targeted (scoped) auto-refresh optimization for issue #914. | ||
| # Companion to java-dep-refresh-generated-files.yaml (which tests manual Refresh). | ||
| # | ||
| # On auto-refresh the extension passes the changed URI to the server | ||
| # (PackageParams.syncPaths); the server refreshes only the affected subtree (the | ||
| # nearest existing ancestor) instead of the whole source root, then closes the | ||
| # package root to rebuild its package-fragment list. This plan does NOT call | ||
| # java.view.package.refresh — it relies solely on the FileSystemWatcher, so it | ||
| # exercises the syncPaths path. Auto-refresh is on by default. | ||
| # | ||
| # Tree layout and verify policy are the same as the manual-Refresh plan: compact | ||
| # virtualized tree, deterministic verifyTreeItem assertions, no `verify:` on the | ||
| # file-write step (no reliable visual signal for the LLM judge). | ||
| # | ||
| # Usage: | ||
| # npx autotest run test/e2e-plans/java-dep-autorefresh-targeted.yaml \ | ||
| # --override extensionPath=<path-to-this-repo> | ||
|
|
||
| name: "Java Dependency — Auto-refresh surfaces a new package (targeted, #914)" | ||
| description: | | ||
| Validates the targeted (scoped) auto-refresh optimization for issue #914: a | ||
| .java file written by an external generator into a brand-new sub-package must | ||
| appear in the Java Projects view via the file-watcher auto-refresh alone (no | ||
| manual Refresh), which routes the changed URI through PackageParams.syncPaths. | ||
|
|
||
| setup: | ||
| extension: "redhat.java" | ||
| vscodeVersion: "stable" | ||
| workspace: "../maven" | ||
| timeout: 180 | ||
| settings: | ||
| java.configuration.checkProjectSettingsExclusions: false | ||
| workbench.startupEditor: "none" | ||
| explorer.autoReveal: false | ||
|
|
||
| steps: | ||
| - id: "ls-ready" | ||
| action: "waitForLanguageServer" | ||
| timeout: 180 | ||
|
|
||
| # Free vertical space so the Java Projects tree is not virtualized. | ||
| - id: "close-aux-bar" | ||
| action: "executeVSCodeCommand workbench.action.closeAuxiliaryBar" | ||
|
|
||
| - id: "collapse-outline" | ||
| action: "collapseSidebarSection OUTLINE" | ||
|
|
||
| - id: "collapse-timeline" | ||
| action: "collapseSidebarSection TIMELINE" | ||
|
|
||
| - id: "collapse-explorer-folders" | ||
| action: "collapseSidebarSection maven" | ||
|
|
||
| - id: "focus-java-projects" | ||
| action: "executeVSCodeCommand javaProjectExplorer.focus" | ||
|
|
||
| - id: "wait-tree-load" | ||
| action: "wait 3 seconds" | ||
|
|
||
| # The source root must be expanded so a PackageRootNode exists to target. | ||
| - id: "expand-project" | ||
| action: "expandTreeItem my-app" | ||
| verify: "my-app project expanded" | ||
|
|
||
| - id: "expand-source-root" | ||
| action: "expandTreeItem src/main/java" | ||
| verify: "source root src/main/java expanded" | ||
|
|
||
| - id: "baseline-existing-pkg" | ||
| action: "wait 1 seconds" | ||
| verifyTreeItem: | ||
| name: "com.mycompany.app" | ||
| visible: true | ||
|
|
||
| # Negative baseline: the brand-new package must be ABSENT before the file is | ||
| # written, so check-new-pkg-autorefresh later observes a genuine appearance | ||
| # driven by the watcher, not a pre-existing node. | ||
| - id: "baseline-new-pkg-absent" | ||
| action: "wait 1 seconds" | ||
| verifyTreeItem: | ||
| name: "com.mycompany.app.autogen" | ||
| visible: false | ||
| timeout: 5 | ||
|
|
||
| # Write a file straight to disk into a brand-new sub-package. | ||
| - id: "gen-file-new-pkg" | ||
| action: "insertLineInFile src/main/java/com/mycompany/app/autogen/Gen914AutoNewPkg.java 1 package com.mycompany.app.autogen;\n\npublic class Gen914AutoNewPkg {\n}\n" | ||
|
|
||
| - id: "dismiss-overlay" | ||
| action: "pressKey Escape" | ||
|
|
||
| # Let the file watcher + debounced auto-refresh fire. No manual Refresh. | ||
| - id: "wait-for-auto-refresh" | ||
| action: "wait 6 seconds" | ||
|
|
||
| - id: "reexpand-source-root" | ||
| action: "expandTreeItem src/main/java" | ||
|
|
||
| # The brand-new package appears via auto-refresh alone. | ||
| - id: "check-new-pkg-autorefresh" | ||
| action: "wait 1 seconds" | ||
| verifyTreeItem: | ||
| name: "com.mycompany.app.autogen" | ||
| visible: true | ||
| timeout: 20 |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.