Skip to content

Commit

Permalink
build-debug
Browse files Browse the repository at this point in the history
  • Loading branch information
mcecode committed Nov 27, 2024
1 parent 672ebc9 commit 5917997
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/build-debug-harper-ls.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Build Debug

on:
push:
branches: ["build-debug-harper-ls"]

jobs:
build:
name: Build
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
targets: x86_64-unknown-linux-gnu
- name: Build
run: cargo +stable build --locked --profile dev --bin harper-ls --target x86_64-unknown-linux-gnu
- name: Archive
run: |
cd target/x86_64-unknown-linux-gnu/debug
tar -czf ../../../harper-ls.tar.gz harper-ls
cd -
- name: Upload
uses: actions/upload-artifact@v4
with:
name: debug-build
path: harper-ls.tar.gz
16 changes: 16 additions & 0 deletions harper-ls/src/backend.rs
Original file line number Diff line number Diff line change
Expand Up @@ -477,6 +477,22 @@ impl LanguageServer for Backend {

async fn did_change_configuration(&self, params: DidChangeConfigurationParams) {
self.update_config_from_obj(params.settings).await;

let urls: Vec<Url> = {
let mut doc_lock = self.doc_state.lock().await;
let config_lock = self.config.read().await;

for doc in doc_lock.values_mut() {
doc.linter = LintGroup::new(config_lock.lint_config, doc.dict.clone());
}

doc_lock.keys().cloned().collect()
};

for url in urls {
let _ = self.update_document_from_file(&url, None).await;
self.publish_diagnostics(&url).await;
}
}

async fn code_action(&self, params: CodeActionParams) -> Result<Option<CodeActionResponse>> {
Expand Down

0 comments on commit 5917997

Please sign in to comment.