Skip to content

Commit

Permalink
Add workspace file with examples (#1544)
Browse files Browse the repository at this point in the history
## Motivation

For VSCode users, right now `rust-analyzer` doesn't recognize anything in the examples folder. That makes the red squiggles for errors, auto complete, jump to definition, etc not work from within the examples folder.

## Proposal

The reason for that is because examples isn't included in the workspace. I'm adding with this PR a workspace file. If you open your `linera-protocol` checkout using File -> Open Workspace from File and choose this file, it'll open a workspace with both the root directory and the examples directory in it, making all `rust-analyzer` features work on the examples folder as well.

## Test Plan

Tested locally, I see errors in examples now (in my WIP code for another PR)
  • Loading branch information
Andre da Silva authored Jan 23, 2024
1 parent 3c2f0fb commit 147ad73
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ jobs:
cargo machete
- name: Check for outdated README.md
run: |
(set -e; for I in linera-*; do echo $I; cargo rdme --check --no-fail-on-warnings -w $I; done)
(set -e; for I in linera-*; do if [ -d "$I" ]; then echo $I; cargo rdme --check --no-fail-on-warnings -w $I; fi; done)
cd examples
(set -e; for I in fungible social crowd-funding amm counter meta-counter matching-engine; do echo $I; cargo rdme --check --no-fail-on-warnings -w $I; done)
- name: Run Wasm application lints
Expand Down
13 changes: 13 additions & 0 deletions linera-protocol.code-workspace
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"folders": [
{
"path": "."
},
{
"path": "examples"
}
],
"settings": {
"rust-analyzer.showUnlinkedFileNotification": false
}
}

0 comments on commit 147ad73

Please sign in to comment.