Skip to content
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

Some files for debugging via VSCode #604

Merged
merged 10 commits into from
Nov 30, 2021

Conversation

Hecatron
Copy link
Contributor

I've added some files for debugging under Visual Studio Code
This should allow for stepping through the code / breakpoints etc

I'd recommend the following to use it

  • LLVM (For the LLDB Debugger) installed and on the path
  • VSCode Extension - CodeLLDB
  • VSCode Extension - "rust-analyser" (not the "rust" one)
  • VSCode Extension - "Task Explorer"
  • VSCode Extension - "crates"

@sagiegurari
Copy link
Owner

not sure about this one. i use nvim myself, but even if i would use vscode, i would prefer not to have stuff injected into my project or get pushed by mistake.
this feels like something we can expand on in the documentation, in the IDE support section. maybe have the files in the documentation folder and link to them from the readme.
wdyt?

@Hecatron
Copy link
Contributor Author

I've relocated the vscode files into the docs directory, although I'm not sure how to integrate them into Jekyl since I don't have ruby installed.
Also added .vscode to .gitignore
and updated the readme

For the readme I added a small development section at the bottom, but I wasn't sure if that should be in the Contributing page instead.
Let me know if any other changes are needed.

Copy link
Owner

@sagiegurari sagiegurari left a comment

Choose a reason for hiding this comment

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

you put the vscode files in the right place.
the docs, you need to modify the md files (content and nav md files) which are used

  1. in the github.io site as is
  2. used to generate the full readme md

.gitignore Outdated
@@ -9,3 +9,4 @@ dump.rdb
/rs*.sh
/docs/_site
/core
/.vscode
Copy link
Owner

Choose a reason for hiding this comment

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

i think we can remove this entry.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This should now be done

README.md Outdated
@@ -113,6 +113,7 @@
* [Roadmap](#roadmap)
* [Editor Support](#editor-support)
* [Contributing](.github/CONTRIBUTING.md)
* [Development](#development)
Copy link
Owner

Choose a reason for hiding this comment

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

this is a generated file. you can look at the doc folder, and you will see a sub folder with templates for the nav and content md files.
so this goes to the nav.
also, we should not add a new section, instead lets use the Editor Support section that already exists and talks about vim.


### VSCode

For debugging purposes there are some example .vscode files located within the [docs/vscode-example](./docs/vscode-example) directory
Copy link
Owner

Choose a reason for hiding this comment

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

awesome!

README.md Outdated
@@ -3477,6 +3478,32 @@ You can view the future development items list in the [github project issues](ht
## Contributing
See [contributing guide](.github/CONTRIBUTING.md)

<a name="development"></a>
## Development
Copy link
Owner

Choose a reason for hiding this comment

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

lets move this whole thing under 'editor support' and maybe create sub section for vim and vscode (vim already exists).

@sagiegurari sagiegurari changed the base branch from master to 0.35.6 October 31, 2021 13:13
@codecov-commenter
Copy link

codecov-commenter commented Oct 31, 2021

Codecov Report

Merging #604 (b3c9b68) into 0.35.7 (f02b0b9) will decrease coverage by 25.62%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff             @@
##           0.35.7     #604       +/-   ##
===========================================
- Coverage   93.51%   67.89%   -25.63%     
===========================================
  Files          98       98               
  Lines       19390    19624      +234     
===========================================
- Hits        18132    13323     -4809     
- Misses       1258     6301     +5043     
Impacted Files Coverage Δ
src/lib/storage_test.rs 0.00% <0.00%> (-100.00%) ⬇️
src/lib/proxy_task_test.rs 0.00% <0.00%> (-100.00%) ⬇️
src/lib/recursion_level_test.rs 0.00% <0.00%> (-100.00%) ⬇️
src/lib/scriptengine/rsscript.rs 0.00% <0.00%> (-92.99%) ⬇️
src/lib/cli_test.rs 5.11% <0.00%> (-91.70%) ⬇️
src/lib/scriptengine/rsscript_test.rs 0.00% <0.00%> (-86.62%) ⬇️
src/lib/environment/mod_test.rs 11.91% <0.00%> (-83.83%) ⬇️
src/lib/legacy_test.rs 17.64% <0.00%> (-82.36%) ⬇️
src/lib/runner_test.rs 29.74% <0.00%> (-61.11%) ⬇️
src/lib/profile_test.rs 40.27% <0.00%> (-59.73%) ⬇️
... and 50 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f02b0b9...b3c9b68. Read the comment docs.

@sagiegurari sagiegurari changed the base branch from 0.35.6 to 0.35.7 November 1, 2021 15:47
@sagiegurari
Copy link
Owner

@grbd just want to make sure you saw the comments in this PR

@sagiegurari sagiegurari added this to the 0.35.7 milestone Nov 8, 2021
@sagiegurari
Copy link
Owner

@grbd friendly ping :)
you don't really need jekyl for this PR. just look at the generated md files.

@Hecatron
Copy link
Contributor Author

Ok I think I've resolved all the above now

"clean"
]
},
{
Copy link
Owner

Choose a reason for hiding this comment

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

i'll change this one to use the cargo-make formatter task.
it comes with built in support to auto install rustfmt

Comment on lines +3375 to +3384
### Rust Format

After making changes to the code, rustfmt can be used to automatically reformat the code within the repository
```
# To install
rustup component add rustfmt
# To run on the cargo project
cargo fmt
```

Copy link
Owner

Choose a reason for hiding this comment

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

i'll remove this one as cargo make comes with built in formatting task that auto installs it for you

Comment on lines +47 to +56
{
"label": "run the tests",
"detail": "Run the tests",
"type": "process",
"group": "build",
"command": "cargo",
"args": [
"test"
]
},
Copy link
Owner

Choose a reason for hiding this comment

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

i'll also change this one to use the cargo make test which knows to run multi phase tests (tests for single thread + multi thread + custom tasks for tests)

@sagiegurari
Copy link
Owner

thanks @grbd
i'll be doing changes after merge to use the cargo-make tasks and not cargo commands as they do a lot more (including auto install rustfmt, run multi phase tests and so on...)

@Hecatron
Copy link
Contributor Author

Ok, the bit I added about using cargo fmt
was just a reminder to use cargo fmt after changing any code to check for any formatting issues before submitting changes to the cargo-make repo.

@sagiegurari
Copy link
Owner

@grbd thanks for the PR. i'm merging it and i'll make few changes as i commented on the files themselves.

@sagiegurari sagiegurari merged commit e1d0bd1 into sagiegurari:0.35.7 Nov 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants