Commit graph

272 commits

Author SHA1 Message Date
Boshen
c767a2ede0
ci: fix ecosystem-ci build 2024-04-02 17:47:05 +08:00
Boshen
d63127d009
chore: only build the allocators in release mode because they are slow to build (60s) 2024-04-02 17:39:01 +08:00
Boshen
3ca6721783
ci: always run cargo shear 2024-03-31 16:06:22 +08:00
Boshen
52a9f08a57
chore: remove release-plz 2024-03-30 13:50:41 +08:00
Boshen
348c3e9bb3
ci: rename and tweak publish crates action 2024-03-30 13:20:29 +08:00
underfin
b199cb89a2
feat: add oxc sourcemap crate (#2825)
The sourcemap implement port from
[rust-sourcemap](https://github.com/getsentry/rust-sourcemap), but has
some different with it.

- Encode sourcemap at parallel, including quote `sourceContent` and
encode token to `vlq` mappings.
- Avoid `Sourcemap` some methods overhead, like `SourceMap::tokens()`
caused extra overhead at common cases. Here using `SourceViewToken` to
instead of it.
2024-03-28 19:36:38 +08:00
Boshen
c5ccd5e7a1
ci: add release-plz 2024-03-26 18:18:16 +08:00
Dunqing
224299fe5c
ci: ci should run when clone-submodules/action.yml changes (#2816)
When we change `clone-submodules/action.yml`, the snapshot will probably be updated as well, so I'd run ci to make sure the snapshot is correct.
2024-03-26 11:58:55 +08:00
Boshen
66117b10aa
ci: cargo doc --no-deps 2024-03-26 01:56:16 +08:00
Boshen
06a81409f1
ci: actions/checkout@v4 -> taiki-e/checkout-action@v1 (#2811)
This does not depend on node.js, and sets persist-credentials to false
2024-03-26 01:24:51 +08:00
Boshen
e32a3b3783
ci: use cargo-shear (#2810) 2024-03-26 00:43:10 +08:00
overlookmotel
29d8a64bc9
perf(tasks): speed up NAPI parser benchmark build (#2787)
The `parser_napi` pseudo-benchmark does not depend on any Oxc crates, so
remove all dependencies for this benchmark. This reduces build time of
this benchmark on CI by ~1 minute.

After #2780, NAPI parser benchmark sometimes took the longest of all the
benchmarks, so making it faster reduces time to complete the benchmarks
overall.
2024-03-22 12:09:32 +00:00
overlookmotel
2fe158d0d6
refactor(tasks): separate NAPI benchmark CI job (#2783)
Not a substantive change. This just prevents the other benchmark jobs
showing greyed-out "Build NAPI benchmark" steps, and makes the workflow
file easier to follow.

CI tasks were stuck at "Waiting for status to be reported", and unable
to merge until they passed. Problem was that CI task doesn't run if only
`.yml` files are altered. So have added a dummy comment to a random Rust
file just to get it to run. Will make another PR after to remove the
comment again!
2024-03-21 23:30:38 +00:00
overlookmotel
508091314f
feat(tasks): benchmark NodeJS parser (#2770)
Add NodeJS parser to benchmarks.

Previous attempt #2724 did not work due CodSpeed producing very
inaccurate results (https://github.com/CodSpeedHQ/action/issues/96).

This version runs the actual benchmarks without CodSpeed's
instrumentation. Then another faux-benchmark runs within Codspeed's
instrumented action and just performs meaningless calculations in a loop
for as long as is required to take same amount of time as the original
uninstrumented benchmarks took.

It's unfortunate that we therefore don't get flame graphs on CodSpeed,
but this seems to be the best we can do for now.
2024-03-20 05:06:09 +00:00
overlookmotel
5edd196836
fix(tasks): fix codspeed upload for PRs from forks (#2759)
#2751 contained a mistake, which was pointed out by Adrian @ CodSpeed on
Discord.

For PRs from forks, `CODSPEED_TOKEN` is not provided, and the submission
to CodSpeed is "tokenless". #2751 wrongly assumed all runs are submitted
with a token. This PR fixes that.
2024-03-18 20:29:16 +00:00
overlookmotel
68f304faa3
feat(tasks): shard linter benchmarks in CI (#2752)
Follow-on from #2751. Further shards linter benchmarks so each fixture runs in its own job.

This reduces total time to run benchmarks by another ~75 secs. So approx 2.5 mins shaved off in total.
2024-03-18 10:50:44 +08:00
overlookmotel
93e1ea4419
feat(tasks): shard benchmarks in CI (#2751)
This PR shards benchmarks when running on CI. Each benchmark (parser, minifier etc) runs as a separate job, and then a final job combines the results and uploads to Codspeed.

A bit of a hacky implementation. Uses a small NodeJS HTTP server to intercept the results from `codspeed-runner`, and then another NodeJS script to combine them all together, and upload to CodSpeed.

I will submit PRs on Codspeed's runner + action to do it properly, but as I imagine it'll be a slow process getting that merged upstream, I wanted to see if it worked first. We can replace this once it's supported upstream.

Sharding only reduces total time to run the benchmarks by about 70 secs at present, because linter benchmark takes 6 mins alone and holds up the whole process (all the rest are done in ~2 mins). If we can split up the linter benchmark, we can likely get total run time down to around 3 mins. I'll try that in a follow-on PR.

I guess the other upside is we can now add as many benchmarks as we like with impunity - they'll run in parallel, and so won't slow things down overall.
2024-03-18 10:45:44 +08:00
overlookmotel
78f1adc043
chore(napi): remove oxc-parser from benchmarks (#2738)
#2724 added CodSpeed benchmarks for NodeJS `oxc-parser`.

Unfortunately it turns out CodSpeed's results are wildly inaccurate.
Unclear why, but have raised an issue with CodSpeed
(https://github.com/CodSpeedHQ/action/issues/96). In meantime it seems
best to remove the benchmarks as they're not useful at present.
2024-03-16 23:39:23 +08:00
overlookmotel
af47aebc7c
chore(napi): add oxc-parser to benchmarks (#2724)
Closes #2616.

Adds benchmarks for NodeJS NAPI build. Measurement includes `JSON.parse`
of the AST on JS side, since that's how it'll be used 99% of the time.

Benchmarks run against same files as Rust parser benchmarks, so we can
see the overhead of transferring AST to JS.
2024-03-15 19:45:02 +08:00
renovate[bot]
68c01d304e
chore(deps): update softprops/action-gh-release action to v2 (#2676) 2024-03-11 15:33:50 +08:00
Boshen
8bb1084863
feat(codegen): add sourcemap (#2565)
Co-authored-by: underfin <2218301630@qq.com>
2024-03-03 14:44:49 +08:00
Boshen
4f22eaaf96
ci: check cargo doc for all crates 2024-02-21 18:03:49 +08:00
Boshen
160498be18
ci: add publish to open vsx registry 2024-02-18 16:55:22 +08:00
Boshen
24a9255610
Release napi oxc-parser@v0.4.0 2024-02-11 12:37:44 +08:00
Boshen
5723690fdf
Release napi oxc-parser@v0.4.0-alpha.0 2024-02-11 11:56:46 +08:00
overlookmotel
1baf9c33d2
ci: run benchmarks on branches called bench-* (#2365)
I've recently switched over from hacking on a fork to working directly
on upstream, in order to be able to use Graphite.

One thing I miss now is ability to create branches and run CodSpeed on
them while developing. Compared to running benches locally, CodSpeed has
the advantage of giving you a visual history, showing how each commit
you push moves the dials.

This PR makes the benchmarks run for any branch named `bench-*`, in
order to enable this workflow on upstream, without having to open a
draft PR for every experiment.
2024-02-09 20:57:37 +08:00
Boshen
5d9b0f3312
ci: speed up benchmark build (#2343)
closes #2299

Managed to figure out what `cargo codspeed build` is doing :-)
2024-02-08 19:47:50 +08:00
Boshen
0f28dc8894
ci: move conformance.yml to ci.yml 2024-02-06 23:01:58 +08:00
Boshen
a928eeaff8
ci: skip benchmark for codegen 2024-02-06 22:55:52 +08:00
Boshen
3b7dfb9bd1
Release oxlint and vscode extension v0.2.8 2024-02-06 15:57:00 +08:00
Boshen
839e7c5c22
feat(napi/parser): add more linux-musl targets 2024-02-06 00:04:25 +08:00
renovate[bot]
7138432541
chore(deps): update codecov/codecov-action action to v4 (#2305)
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [codecov/codecov-action](https://togithub.com/codecov/codecov-action)
| action | major | `v3` -> `v4` |

---

### Release Notes

<details>
<summary>codecov/codecov-action (codecov/codecov-action)</summary>

### [`v4`](https://togithub.com/codecov/codecov-action/compare/v3...v4)

[Compare
Source](https://togithub.com/codecov/codecov-action/compare/v3...v4)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "before 8am on monday" in timezone
Asia/Shanghai, Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/oxc-project/oxc).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4xNzAuMCIsInVwZGF0ZWRJblZlciI6IjM3LjE3MC4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-02-05 13:08:56 +08:00
Boshen
6002560fa1
feat(span): fix memory leak by implementing inlineable string for oxc_allocator (#2294)
closes #1803

This string is currently unsafe, but I want to get miri working before
introducing more changes.

I want to make a progress from memory leak to unsafe then to safety.
It's harder to do the steps in one go.
2024-02-04 19:28:23 +08:00
Boshen
3569e42475
ci: install just in conformance 2024-02-02 22:49:15 +08:00
Boshen
b2040ed2ec
ci: use node.js 20 2024-02-02 22:28:23 +08:00
Boshen
54dfd91729
ci: temporary fix git clones 2024-02-02 22:27:15 +08:00
Dunqing
3cb85778bc
ci: incorrect uses value (#2276) 2024-02-02 21:53:10 +08:00
Boshen
d2f7ea2923
chore: manually clone git modules instead of using submodules (#2274)
closes #2231

Submodules are a blocker for beginners, we should make it clone on
demand.

It is also a blocker for people who wants to target this repo as a crate
for testing purposes, cargo will do a full clone if you specify
oxc_parser = { git = "this repo" } in Cargo.toml
2024-02-02 11:56:18 +00:00
Boshen
d6ba058f77
ci: paths-filter v3 (#2267) 2024-02-02 16:21:34 +08:00
Boshen
a3df55e7ed
ci: unify the usage of concurrency.group
github.ref refers to the branch
2024-02-02 11:20:44 +08:00
Boshen
c0bdd050ee
ci: s/macos-latest/macos-14 (#2244) 2024-02-01 13:30:49 +08:00
Boshen
9c6c17b9aa
feat(wasm/parser): improve FFI (#2232) 2024-01-31 15:53:32 +08:00
Boshen
b2894c6a38
Release @oxc-parser/wasm v0.0.2 2024-01-30 21:43:41 +08:00
Boshen
5ac61f09a0
feat: setup wasm parser for npm (#2221) 2024-01-30 21:40:10 +08:00
Nicholas Roberts
cd5026c015
feat(ast): TypeScript definition for wasm target (#2158)
Closes #2151
2024-01-30 15:43:03 +08:00
Boshen
ab8a3114a2
feat(cli): add --version (#2182)
closes #2154
2024-01-26 19:13:17 +08:00
Yuji Sugiura
cba8a4c131
feat(tasks): Enable tasks/lint_rules(JS ver) (#2177)
- [x] Remove old task(Rust ver)
- [x] Migrate to new task(JS ver)
- [x] Confirm CI works w/o `--output`
-
https://github.com/oxc-project/oxc/actions/runs/7663961642/job/20887579432?pr=2177
- [x] Confirm CI works w/ fake issue no
  - https://github.com/oxc-project/oxc/issues/2117
- [x] Enable

- - -

I've noticed that

- eslint/no-extra-semi
- eslint/no-mixed-spaces-and-tabs

are maked as deprecated and also recommended.

This is ESLint side
[issue](https://github.com/eslint/eslint/pull/17696#issuecomment-1792452766)
and will fix after v9.
2024-01-26 15:45:05 +08:00
xc2
8e332b20a1
ci(oxlint): run smoke test against both glibc and musl (#2155) 2024-01-24 11:10:53 +08:00
Boshen
382a187175
fix(npm): fix bin script for musl / gnu 2024-01-23 19:09:11 +08:00
Boshen
fda2d7c334
deps(website): bump deps (#2146) 2024-01-23 17:15:42 +08:00