zed/crates/languages
Glaudiston Gomes da Silva 00eed768ce
Fix Go test task when using Git submodules (#17108)
I have found an error running tests in Golang projects that use
submodules. This PR fixes the issue by accessing the directory before
running the test.

![image](https://github.com/user-attachments/assets/3790a77c-a07c-4467-be69-ee8e22675f7a)
The `commons` in the image is a git submodule in a subfolder inside a
parent folder where the workspace is set.


Release Notes:

- Fixed Go tests not being able to run in case the package (and the
`go.mod`) was in a nested folder. Pre-defined Go tasks have been changed
to now run in the package's directory. That means `go test ./package
-run MyTest` will run in `./package` and execute `go test -run MyTest`.
Also, `go test ./...` will run in the package directory, not at the root
of the Zed project, which is a small breaking change. In case one wants
to run `go test ./...` from the root, one can spawn a manual task that
does this.


![image](https://github.com/user-attachments/assets/b7c66f6a-ca29-421e-9539-737c8f719ae2)

---------

Co-authored-by: Thorsten Ball <mrnugget@gmail.com>
2024-08-30 16:11:27 +02:00
..
src Fix Go test task when using Git submodules (#17108) 2024-08-30 16:11:27 +02:00
Cargo.toml Replace lazy_static with std::sync::LazyLock (#16066) 2024-08-20 14:27:33 -04:00
LICENSE-GPL chore: Extract languages from zed crate (#8270) 2024-02-23 15:56:08 +01:00