Skip to content

Commit

Permalink
Merge branch 'master' into replace-unknown-local-function
Browse files Browse the repository at this point in the history
  • Loading branch information
sheldak committed Jun 30, 2023
2 parents 1608bc3 + 9427f7f commit f92bcfe
Show file tree
Hide file tree
Showing 236 changed files with 1,865 additions and 938 deletions.
3 changes: 2 additions & 1 deletion .formatter.exs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
subdirectories: [
"apps/elixir_ls_utils",
"apps/elixir_ls_debugger",
"apps/language_server"
"apps/language_server",
"scripts"
]
]
2 changes: 1 addition & 1 deletion .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
While you can develop ElixirLS on its own, it's easiest to test out changes if you clone the [vscode-elixir-ls](https://github.com/elixir-lsp/vscode-elixir-ls) repository instead. It includes ElixirLS as a Git submodule, so you can make your changes in the submodule directory and launch the extension from the parent directory via the included "Launch Extension" configuration in `launch.json`. See the README on that repo for more details.
While you can develop ElixirLS on its own, it's easiest to test out changes if you clone the [vscode-elixir-ls](https://github.com/elixir-lsp/vscode-elixir-ls) repository instead. It includes ElixirLS as a Git submodule, so you can make your changes in the submodule directory and launch the extension from the parent directory via the included "Launch Extension local" configuration in `launch.json`. See the README.md on that repo for more details.
7 changes: 4 additions & 3 deletions .github/SUPPORT.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Thank you for using ElixirLS! :tada:
This document offers some guidelines when asking for support related to an
issues that you might encounter when using ElixirLS.

# Guidelines
## Guidelines

These are some general guidelines to follow when reaching out through any of the
available support channels.
Expand All @@ -15,6 +15,7 @@ available support channels.
one**

Also check [elixir\_sense issues](https://github.com/elixir-lsp/elixir_sense/issues)
and [vscode-elixir-ls issues](https://github.com/elixir-lsp/vscode-elixir-ls/issues)

Check if one already exists related to the issue you are having. Remember
to include `closed` issues as well.
Expand All @@ -29,8 +30,8 @@ available support channels.
This can be applied to life in general, but it's especially important when
communicating only through written text.

# Support Channels
## Support Channels

- Github [Issues](https://github.com/elixir-lsp/elixir-ls/issues/).
- #elixir-ls tag on the [elixir forum](https://elixirforum.com/).

- Slack [#language-server](https://elixir-lang.slack.com/archives/C7D272G6N)
21 changes: 11 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@ jobs:
fail-fast: false
matrix:
include:
- elixir: 1.12.x
otp: 22.x
- elixir: 1.12.x
otp: 23.x
- elixir: 1.13.x
otp: 22.x
- elixir: 1.13.x
Expand All @@ -34,6 +30,10 @@ jobs:
otp: 24.x
- elixir: 1.14.x
otp: 25.x
- elixir: 1.15.x
otp: 24.x
- elixir: 1.15.x
otp: 25.x
env:
MIX_ENV: test
steps:
Expand All @@ -56,10 +56,6 @@ jobs:
fail-fast: false
matrix:
include:
- elixir: 1.12.x
otp: 22.x
- elixir: 1.12.x
otp: 23.x
- elixir: 1.13.x
otp: 22.x
- elixir: 1.13.x
Expand All @@ -74,6 +70,10 @@ jobs:
otp: 24.x
- elixir: 1.14.x
otp: 25.x
- elixir: 1.15.x
otp: 24.x
- elixir: 1.15.x
otp: 25.x
env:
MIX_ENV: test
steps:
Expand All @@ -98,7 +98,7 @@ jobs:
strategy:
matrix:
include:
- elixir: 1.14.x
- elixir: 1.15.x
otp: 25.x
steps:
- uses: actions/checkout@v3
Expand All @@ -123,4 +123,5 @@ jobs:
run: IFS=$'\n'; for f in $(git ls-files); do touch -d "$(git log -n 1 --pretty='%cI' -- $f)" "$f"; done
- run: MIX_ENV=test mix format --check-formatted
- run: cd apps/language_server && MIX_ENV=test mix format --check-formatted
- run: mix dialyzer_vendored
# TODO reenable
# - run: mix dialyzer_vendored
68 changes: 15 additions & 53 deletions .github/workflows/release-asset.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Elixir CI
name: Release

on:
push:
Expand All @@ -22,61 +22,35 @@ jobs:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: true
prerelease: false
prerelease: ${{ contains(github.ref, '-rc.') }}

build:
name: Build and publish release asset
runs-on: ubuntu-20.04
needs: release

strategy:
matrix:
include:
- elixir-version: '1.14'
otp-version: '25.1'
- elixir-version: '1.14'
otp-version: '24.3'
- elixir-version: '1.14'
otp-version: '23.3'
- elixir-version: '1.13'
otp-version: '25.1'
- elixir-version: '1.13'
otp-version: '24.3'
- elixir-version: '1.13'
otp-version: '23.3'
- elixir-version: '1.13'
otp-version: '22.3'
- elixir-version: '1.12'
otp-version: '24.3'
- elixir-version: '1.12'
otp-version: '23.3'
- elixir-version: '1.12'
otp-version: '22.3'
default: true

steps:
- uses: actions/checkout@v3

- name: Validate version
run: |
VERSION="$(cat ./VERSION)"
if [[ "$GITHUB_REF_NAME" != "v$VERSION" ]]; then
echo "VERSION $VERSION does not match commit tag $GITHUB_REF_NAME"
exit 1
fi
- name: Set up BEAM
uses: erlef/setup-beam@v1
with:
elixir-version: ${{ matrix.elixir-version }}
otp-version: ${{ matrix.otp-version }}

- name: Restore dependencies cache
uses: actions/cache@v3
with:
path: deps
key: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }}
restore-keys: ${{ runner.os }}-mix-
elixir-version: 1.14.x
otp-version: 25.x

- name: Install dependencies
run: mix deps.get

- name: Build release
run: |
mkdir ./release
mix compile
MIX_ENV=prod mix elixir_ls.release -o ./release
mix elixir_ls.release2 -o ./release
zip -jr elixir-ls.zip ./release
- name: Upload Release Asset
Expand All @@ -86,17 +60,5 @@ jobs:
with:
upload_url: ${{ needs.release.outputs.upload_url }}
asset_path: ./elixir-ls.zip
asset_name: elixir-ls-${{ matrix.elixir-version }}-${{ matrix.otp-version }}.zip
asset_content_type: application/zip

- name: Upload Default Release Asset
if: ${{ matrix.default == true }}
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.release.outputs.upload_url }}
asset_path: ./elixir-ls.zip
asset_name: elixir-ls.zip
asset_name: elixir-ls-${{ github.ref_name }}.zip
asset_content_type: application/zip

48 changes: 48 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,53 @@
### Unreleased

### v0.15.1: 29 June 2023

#### Improvements

- This is the first release supporting OTP 26. Unfortunately due to bugs in OTP only 26.0.2+ is supported. See [886](https://github.com/elixir-lsp/elixir-ls/issues/886) and [923](https://github.com/elixir-lsp/elixir-ls/pull/923) for details

#### Fixes

- Fixed crash when handling `workspace/didChangeWatchedFiles` when `project_dir` not yet set
- ExUnit test tracer is now under build lock. This should fix crashes due tu race conditions
- Fixed completion of remote calls matching locals without parens (e.g. `Map.drop` when `drop` is local without parens from `ecto_sql`) [Milo Lee](https://github.com/oo6)

### v0.15.0: 20 June 2023

#### Improvements

- This is the first release supporting Elixir 1.15. See [898](https://github.com/elixir-lsp/elixir-ls/pull/898) for details
- Main distribution mode switched to `Mix.install` script. This allows running ElixirLS built with a correct combination of OTP and elixir. Previously used `.ez` releases suffered from numerous problems stemming from version incompatibilities (e.g. [193](https://github.com/elixir-lsp/elixir-ls/issues/193))
- elixir_sense replaced many of its custom source parsing internals with elixir 1.13+ Code.Fragment APIs
- `require` and `import` are now understood by elixir_sense. This improves accuracy of definition, hover, references and complete providers. For example only imports matching `only` and `except` options will now be suggested by complete provider.
- When accepting a completion with a not required macro a `require` directive will be now added to module.
- Reimplemented `use` macro expansion. This should improve accuracy.
- Better handling of typespecs in elixir_sense. This should improve accuracy in modules with defs and types sharing the same name.
- Added ability to pass command line options to elixir and erlang via `ELS_ELIXIR_OPTS` and `ELS_ERL_OPTS`. This allows for setting a node name and connecting remotely to language server and debugger.

#### Fixes

- Fixed a longstanding bug with formatter not respecting `.formatter.exs` when code is compiling (requires elixir 1.15) [Thomas Depierre](https://github.com/DianaOlympos)
- Fixed invalid alias handling with submodules

#### Breaking changes and deprecations

- Elixir 1.12 is no longer supported
- `.ez` archive based distribution is now deprecated

### v0.14.6: 6 May 2023

#### Improvements

- added option `elixirLS.autoInsertRequiredAlias` controlling if complete provider
will auto insert aliases [Zeke Dou](https://github.com/c4710n)

#### Fixes

- Pin elixir_sense, dialyxir and jason versions to ensure compatibility
- Reduce long file names. This should fix compilation issues on some filesystems
- Fixed crash in dialyzer

### v0.14.5: 21 April 2023

#### Fixes
Expand Down
43 changes: 35 additions & 8 deletions DEVELOPMENT.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,41 @@
# Development

## Version Support Guidelines
It's best to disable ElixirLS when working on ElixirLS and elixir_sense. Without that modules from edited code conflict with modules from the running language server.

Elixir itself supports 5 versions with security updates:
https://hexdocs.pm/elixir/compatibility-and-deprecations.html#content
## Building and testing

OTP Supports the last 3 versions:
http://erlang.2086793.n4.nabble.com/OTP-Versions-and-Maint-Branches-td4722416.html
### Installing

ElixirLS generally aims to support the last 3 versions of Elixir and the last 3 versions of OTP. However this is not a hard and fast rule and may change in the future.
Clone the repo and run

```shell
mix deps.get
```

### Running tests

Use normal mix commands for running tests.

```shell
mix test
```

### Testing in VSCode

It's easiest to test ElixirLS with [VSCode extension](https://github.com/elixir-lsp/vscode-elixir-ls) with ElixirLS as a git submodule. Refer to that repo for detailed instructions.

### Local release

You can run a local release of language server and debugger with launch scripts from `scripts` directory with `ELS_LOCAL=1` environment variable. This will make the install script use source, lockfile and config from the local ElixirLS directory.

```shell
cd path/to/my_project
ELS_LOCAL=1 /path/to/elixir-ls/scripts/language_server.sh
```

### Formatting

You may need to separately run `mix format` in the ElixirLS root and in `apps/language_server` directory.

## Packaging

Expand All @@ -19,9 +46,9 @@ Follow those instructions when publishing a new release.
3. Make PR
4. Merge PR
5. Pull down the latest master
6. Make the tag from the new master
6. Make the tag from the new master matching version number with `v` prefix (e.g. `v0.1.2`)
7. Push the tag (`git push upstream --tags`)
8. Wait for github actions to push up a draft release https://github.com/elixir-lsp/elixir-ls/releases
8. Wait for github actions to push up a draft release https://github.com/elixir-lsp/elixir-ls/releases (Semver tags (e.g. `v0.1.0-rc.0`) will create a prerelease)
9. Edit the draft release with a link to the changelog
10. Publish the draft release

Expand Down
Loading

0 comments on commit f92bcfe

Please sign in to comment.