-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
WIP - feat(lsp): Run tests with file watcher #27762
base: main
Are you sure you want to change the base?
Conversation
file_watcher::PrintConfig::new("Test", false), | ||
file_watcher::WatcherRestartMode::Automatic, | ||
self.token.clone(), | ||
move |flags, watcher_communicator, changed_paths| { |
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'm not entirely sure which files I should pass to the watcher_communicator, and what to do with the changed_paths. I did look at the other places where the file watcher is used, but there the file patterns are part of the CLI arguments.
Meanwhile here, the list of included files are set through the included and excluded tests. Any pointers would be very appreciated.
let line_number = user_frame.line_number.map(|v| v - 1)? as u32; | ||
let column_number = | ||
user_frame.column_number.map(|v| v - 1).unwrap_or(0) as u32; | ||
Some(TestLocation { |
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.
This info lets us show an indicator at the assertEquals()
that actually failed.
I couldn't really find a better way of figuring out where in the user code the error happened. Is this really it?
@@ -24,7 +24,7 @@ deno_path_util.workspace = true | |||
deno_semver.workspace = true | |||
deno_unsync = { workspace = true, features = ["tokio"] } | |||
faster-hex.workspace = true | |||
flate2 = { workspace = true, features = ["zlib-ng-compat"] } | |||
flate2 = { workspace = true, features = ["default"] } |
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.
This change is one of the changes that I'll get rid of when rebasing and fixing the PR. Currently that's just to not require the CMake dependency when developing locally.
@@ -27,4 +27,4 @@ thiserror.workspace = true | |||
windows-sys.workspace = true | |||
|
|||
[dev-dependencies] | |||
libuv-sys-lite = "=1.48.2" | |||
libuv-sys-lite = { version = "=1.48.3", features = ["dyn-symbols"] } |
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.
This change will hopefully not be needed much longer. Hopefully Deno will update its libuv-sys-lite dependency soon :)
This addresses issue denoland/vscode_deno#1132
See linked PR for more context denoland/vscode_deno#1243
This pull request is not ready for merging yet. I opened it so that I can ask questions about my code, and about how to best achieve certain results.
I did my best to implement the following
I did not yet
changed_files
of the file watcherMy questions are left as comments in the code.
Also, this is more of a personal struggle: I initially really struggled to locally build Deno, as Deno requires some dependencies that are nontrivial to install on Windows.
The instructions were incomplete #27535 Upon updating them, nathanwhit figured out how to change libuv-sys-lite to no longer require the LLVM dependency, which was very nice.
The CMake dependency for libz-sys is still there, and it still causes me troubles, so I tweaked it (
zlib-ng-no-cmake-experimental-community-maintained
). My hope is that zlib will eventually get replaced by zlib-rs, which just works.