Skip to content

Upgrade to Volar 2.4.11#784

Merged
machty merged 14 commits intomainfrom
volar-2.4.11
Jan 9, 2025
Merged

Upgrade to Volar 2.4.11#784
machty merged 14 commits intomainfrom
volar-2.4.11

Conversation

@machty
Copy link
Copy Markdown
Contributor

@machty machty commented Jan 8, 2025

No description provided.

Comment thread package.json
"prettier": "^3.3.2",
"release-it": "^15.5.0",
"typescript": ">=5.4.0"
"typescript": ">=5.6.0"
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Volar hugs TS pretty closely; this was necessary due to output lib code referencing SetIterator which is new to TS 5.6. Perhaps at some point we might need some upstream tweaks to make a little room for older Ember apps that are tied to older TS?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

maybe eventually, but TS support and ember support aren't so tied together, so our flexibility here is pretty good -- like older embers can use 5.6 just fine (older = > 5.1, because we're not messing with DT ever)

2 const A = 2 * C;
~

src/index.gts:2:15 - error TS2307: Cannot find module '@glint-test/a' or its corresponding type declarations.
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Since the TS/Volar upgrade, there seems to be some internal changes in the build algorithm, producing more error messages than before if one of the subprojects fails to build.

expect(buildResult.exitCode).toBe(0);
expect(stripAnsi(buildResult.stdout)).toMatch(
`A non-dry build would build project '${projects.main.filePath('tsconfig.json')}'`,
` A non-dry build would update timestamps for output of project '${projects.main.filePath('tsconfig.json')}'`,
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This also seems to be a change/optimization within TSC that's smart enough to realize root project would have no changed output and hence would only update timestamps (?)

},
"message": "'[InvokeDirect]' is declared here.",
},
],
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This additional snapshotted data just means that Volar has since enhanced the metadata provided on each diagnostic, e.g. you should start to see more "SYMBOL is declared here" messages with links to the declaration source.

output = await watch.awaitOutput('Watching for file changes.');
expect(output).toMatch('Found 0 errors.');

expect(watch.allOutput).toMatch(/\033c/); // output should include screen reset control sequence
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

removed this and the test below because the tests were breaking but likely due to an artifact with tty / CI. I checked that preserveWatchOutput still works (and it does); I figure we don't need to double-test stuff that Volar already kind of guarantees for us.

@machty machty merged commit 37ba065 into main Jan 9, 2025
@machty machty deleted the volar-2.4.11 branch January 9, 2025 20:28
@github-actions github-actions Bot mentioned this pull request Mar 23, 2025
@NullVoxPopuli NullVoxPopuli added the internal Changes that don't impact the published packages label Mar 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

internal Changes that don't impact the published packages

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants