Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,11 @@ jobs:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- name: Verify metadata
run: cargo package --workspace --no-verify --exclude polarity-bench --exclude test-runner --exclude lsp-browser
run: cargo package --workspace --no-verify --exclude polarity-bench --exclude test-runner --exclude polarity-lang-lsp-wasm
# The next step is very time intensive, so we only execute it on main.
- name: Verify that tarballs can be built
if: ${{ github.ref == 'refs/heads/main' }}
run: cargo package --workspace --exclude polarity-bench --exclude test-runner --exclude lsp-browser
run: cargo package --workspace --exclude polarity-bench --exclude test-runner --exclude polarity-lang-lsp-wasm

line-endings:
name: Check line endings
Expand Down
40 changes: 20 additions & 20 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ members = [
"lang/driver",
"lang/transformations",
"lang/backend",
"web/crates/browser",
"web/crates/lsp-wasm",
"app",
"bench",
"test/test-runner",
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ coverage:

.PHONY: package-quick
package-quick:
@cargo package --workspace --no-verify --exclude polarity-bench --exclude test-runner --exclude lsp-browser
@cargo package --workspace --no-verify --exclude polarity-bench --exclude test-runner --exclude polarity-lang-lsp-wasm

.PHONY: package
package:
@cargo package --workspace --no-verify --exclude polarity-bench --exclude test-runner --exclude lsp-browser
@cargo package --workspace --exclude polarity-bench --exclude test-runner --exclude polarity-lang-lsp-wasm
8 changes: 8 additions & 0 deletions web/.eslintrc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,14 @@ overrides:
- files: "webpack.config.js"
env:
"node": true
- files:
- "packages/lsp-web/src/**/*.js"
env:
browser: true
globals:
TextDecoder: readonly
TextEncoder: readonly
WritableStream: readonly
- files: ["*.ts", "*.tsx"]
extends:
- plugin:@typescript-eslint/eslint-recommended
Expand Down
20 changes: 12 additions & 8 deletions web/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,31 +6,35 @@ deps:
build: build-server build-app

run: clean-app build-server
@npm run app --workspace=packages/app
@npm run app --workspace=packages/web-editor

build-server: clean-app
@CARGO_PROFILE_CODEGEN_UNITS=1 CARGO_PROFILE_RELEASE_OPT_LEVEL=z CARGO_PROFILE_RELEASE_LTO=fat cargo build -p lsp-browser --target wasm32-unknown-unknown --release
@wasm-bindgen --out-dir ./packages/app/assets/wasm --target web --typescript ../target/wasm32-unknown-unknown/release/lsp_browser.wasm
@CARGO_PROFILE_CODEGEN_UNITS=1 CARGO_PROFILE_RELEASE_OPT_LEVEL=z CARGO_PROFILE_RELEASE_LTO=fat cargo build -p polarity-lang-lsp-wasm --target wasm32-unknown-unknown --release
@wasm-bindgen --out-dir ./packages/lsp-web/assets/wasm --target web --typescript ../target/wasm32-unknown-unknown/release/polarity_lang_lsp_wasm.wasm

build-app:
@npm run build --workspace=packages/app
@npm run build --workspace=packages/web-editor

clean: clean-server clean-app

clean-server:
@cargo clean

clean-app:
@rm -rf packages/app/dist
@rm -rf packages/app/assets/wasm
@rm -rf packages/web-editor/dist
@rm -rf packages/lsp-web/assets/wasm

lint:
@npm run check --workspace=packages/web-editor
@npm run check --workspace=packages/lsp-web
@cargo fmt --all --check
@cargo clippy --all -- -Dwarnings
@npm run lint --workspace=packages/app
@npm run lint --workspace=packages/web-editor
@npm run lint --workspace=packages/lsp-web
@npx stylelint "**/*.css"

format:
@cargo fmt --all
@npm run format --workspace=packages/app
@npm run format --workspace=packages/web-editor
@npm run format --workspace=packages/lsp-web
@npx stylelint "**/*.css" --fix
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "lsp-browser"
name = "polarity-lang-lsp-wasm"

version.workspace = true
edition.workspace = true
Expand Down Expand Up @@ -38,7 +38,7 @@ web-sys = { workspace = true, features = [
"Location",
"HtmlTextAreaElement",
"ReadableStream",
"WritableStream",
"WritableStream",
] }

# workspace dependencies
Expand Down
File renamed without changes.
File renamed without changes.
Loading