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

Set up new repository #1

Merged
merged 23 commits into from
Dec 2, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 49 additions & 15 deletions ...airo-lang-language-server/CONTRIBUTING.md → CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,38 @@
# Contributing to CairoLS

This document is a supplement to the [general contributing guidelines](../../docs/CONTRIBUTING.md)
for the Cairo repository.
Please read that document first carefully before proceeding with the instructions below.
CairoLS is actively developed and open for contributions!

This document you are using Visual Studio Code with the [Cairo extension](../../vscode-cairo) as the
editor of choice for running CairoLS against.
You might also want to check out
the [Cairo extension's contributing guidelines](../../vscode-cairo/CONTRIBUTING.md).
*Want to get started?*
Grab any unassigned issue labelled with [
`help wanted`](https://github.com/software-mansion/cairols/labels/help%20wanted)!

*Looking for some easy warmup tasks?*
Check out issues labelled with [
`good first issue`](https://github.com/software-mansion/cairols/labels/good%20first%20issue)!

When contributing to this repository, please first discuss the change you wish to make via issue,
email, or any other method with the owners of this repository before making a change.

## Commits
## Environment setup

If your commit/pull request is solely related to CairoLS, please prefix your commit message/PR title
with `LS: `.
The latest stable Rust is the only thing you really need.
Arcticae marked this conversation as resolved.
Show resolved Hide resolved
It is recommended to use [rustup](https://rustup.rs/) for getting it.

This document assumes that you are using Visual Studio Code with
the [Cairo extension](https://marketplace.visualstudio.com/items?itemName=starkware.cairo1) as the
editor of choice for running CairoLS against.
You might also want to check out
Arcticae marked this conversation as resolved.
Show resolved Hide resolved
the [Cairo extension's contributing guidelines](https://github.com/software-mansion/vscode-cairo/blob/main/CONTRIBUTING.md).

## Testing

We are building an extensive end-to-end tests suite for CairoLS [here](./tests/e2e).
We are building an extensive end-to-end tests suite for
CairoLS [here](crates/cairo-lang-language-server/tests/e2e).
These tests implement a simple language client that you can control (like put a cursor at certain
position, send a request to the server, etc.).
Check out existing tests for examples of what you can do.
If you need, do not hesitate to extend the language client with new capabilities!
Its source code is located [here](./tests/e2e/support/mod.rs).
If you need, don’t hesitate to extend the language client with new capabilities!
Its source code is located [here](crates/cairo-lang-language-server/tests/e2e/support/mod.rs).
Arcticae marked this conversation as resolved.
Show resolved Hide resolved

> [!IMPORTANT]
> The test suite is not complete, but we **require** adding tests for any new developments.
Expand Down Expand Up @@ -64,8 +75,8 @@ To generate a profile file, paste the following into your `.vscode/settings.json
}
```

This will generate a trace file that you'll be able to further analyze.
CairoLS will print the path to this trace file and instructions on how to analyze it on its standard
This will generate a trace file that you'll be able to further analyse.
CairoLS will print the path to this trace file and instructions on how to analyse it on its standard
error.
In Visual Studio Code you will find this output in the `Output` → `Cairo Language Server` panel.
We're not copying these here because nobody will bother keeping this document in sync.
Expand All @@ -79,4 +90,27 @@ automated),
but you will also enable future developers not to fall into the pitfall that caused the bug you
found and debugged 🤓.

## Git

Try to make small PRs that could be squashed into a single commit.
For larger work, try to make your commits small, self-contained, and well-described.
Each commit should pass lints and tests.
Then, set up a stack of pull requests, separate PR for each commit, and pointing to the previous
one.

While your PR is being reviewed on, you can push merge commits and use [
`git commit --fixup`](https://git-scm.com/docs/git-commit/2.32.0#Documentation/git-commit.txt---fixupamendrewordltcommitgt)
to push further changes to your commits.

## Typos

Our policy is to not accept PRs that only fix typos in the documentation and code.
We appreciate your effort, but we encourage you to focus on bugs and features instead.

---

Thanks! ❤️ ❤️ ❤️

CairoLS Team

[env-filter-directives]: https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html#directives