Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/marefr/symlink-go-test
https://github.com/marefr/symlink-go-test
Last synced: 2 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/marefr/symlink-go-test
- Owner: marefr
- Created: 2024-02-02T18:18:57.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-02-02T18:23:03.000Z (10 months ago)
- Last Synced: 2024-02-02T19:33:53.833Z (10 months ago)
- Language: Shell
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# vscode-go extension with test on save and symbolic links
Test repo for reproducing issue regarding the vscode-go extension with test on save feature enabled when saved package/file is a symbolic link.
**Settings:**
```json
{
"search.followSymlinks": true,
"search.useIgnoreFiles": false,
"go.testOnSave": true
}
```**Reproduction steps:**
1. Setup symbolic links
```
cd ./b
./dev.sh
```2. a/pkg/extensions should now include content from b/src/pkg/extensions as symbolic links
2. Open "a" directory in vs code
```
cd ..
code ./a
```3. Open `pkg/extensions/something/something_test.go`
4. Save the file
5. Output window show the failure when running tests```
Running tool: /usr/local/go/bin/go test github.com/marefr/symlink-go-test/a/pkg/extensions/somethingno required module provides package github.com/marefr/symlink-go-test/a/pkg/extensions/something: go.mod file not found in current directory or any parent directory; see 'go help modules'
```6. Open a terminal in vs code (current directory should be the workspace, `/a`)
7. Paste command from output window above and run test to see that it works as expected
```
~/go/src/github.com/marefr/symlink-go-test/a
❯ /usr/local/go/bin/go test github.com/marefr/symlink-go-test/a/pkg/extensions/something
ok github.com/marefr/symlink-go-test/a/pkg/extensions/something 0.003s
```
8. Remove symbolic links
```
cd ./b
./undev.sh
```