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

Update to std 0.99.0 #27

Merged
merged 20 commits into from
Jul 20, 2021
Merged

Update to std 0.99.0 #27

merged 20 commits into from
Jul 20, 2021

Conversation

tamusjroyce
Copy link
Contributor

Found this to be broken. This is a great alternative to esprima + typescript nodejs modules!

I wonder why there isn't more effort to use swc to convert node packages into deno? Though I am not interested in upgrading a node modules dependencies. The whole point of Deno is to avoid dependency overflow. But if dependency migration is done manually, I would hope this would lead to less of them.

@tamusjroyce
Copy link
Contributor Author

Is there a way to do this as a squash commit? That is if you think this is a valuable PR.

It would also be nice to lock a release to a range of supported deno versions. Not that I want to downgrade. But as Deno version increases, it does seem to break a lot of packages. Deno giving a warning with what versions it has been tested against would be nice.

@wongjiahau wongjiahau requested a review from littledivy June 27, 2021 04:40
examples/print.ts Outdated Show resolved Hide resolved
@littledivy
Copy link
Owner

littledivy commented Jun 27, 2021

Is there a way to do this as a squash commit?

@tamusjroyce Sure, I can create a squash commit when we land this

Copy link
Contributor Author

@tamusjroyce tamusjroyce left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lint

Copy link
Contributor Author

@tamusjroyce tamusjroyce left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comments: false is good documentation. comments: true with minify: true doesn't make sense, so switched to false.

@tamusjroyce tamusjroyce requested a review from littledivy June 28, 2021 05:35
@tamusjroyce
Copy link
Contributor Author

I'll try to get to this tonight or later this week. Thanks for kicking of the ci stack!

…iginal code. Next: need deno lint --ignore=swc_wasm/wasm.js as pre-commit or pre-push hook
@tamusjroyce
Copy link
Contributor Author

tamusjroyce commented Jul 3, 2021

Is there a way to get deno lint --ignore=swc_wasm/wasm.js as pre-commit or a pre-push hook? would be nice to ignore all .js files. Hoping CI is setup to ignore this as well.

Copy link
Contributor Author

@tamusjroyce tamusjroyce left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ready for review with lint issues fixed (should have known deno lint --ignore=swc_wasm/wasm.js was needed. can see lint issues now)

Please edit and update README.md -> import { parse, print } from "https://x.nest.land/swc@0.0.6/mod.ts"; with a new version if published to x.nest.land

@tamusjroyce
Copy link
Contributor Author

@wongjiahau or @littledivy, would you have a chance to run the workflow for this? mostly curious if I got everything. You might have a better attempt at upgrading to 0.99.

I think demo_swc is immensely useful before jumping directly into rust + swc. Hoping others feel the same. Also curious about ajv to rust. Since ajv is a json schema compiler, it would make sense as rust. And give deno extra feature/security people desire (built-in validation).

@wongjiahau
Copy link
Collaborator

@tamusjroyce you need to run deno fmt

Copy link
Contributor Author

@tamusjroyce tamusjroyce left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please review and re-run pipelines.

run-prepush.bat and run-prepush.sh should be able to run prereq's I was missing. would be nice as a prepush hook (though the npm version has broken pushing without --no-verify flag on windows). But I didn't want to overkill it with anything as advanced as denode or velociraptor. run-prepush tested in git-bash, cmd, and powershell only. not tested under wsl1 ubuntu (posix, not Linux), macos (also posix, not Linux), ubuntu Linux, centos, or gentoo

@tamusjroyce
Copy link
Contributor Author

Thank you @wongjiahau or @littledivy for all the assistance and patience. Hoping I have it this time (finally)

@wongjiahau
Copy link
Collaborator

Sorry just saw the message! I'll run the pipeline for you

@tamusjroyce
Copy link
Contributor Author

tamusjroyce commented Jul 16, 2021

I will add Run cd swc_wasm && deno run -A ./build.js to the pre-push script. Getting closer to this matching the pipeline. Thanks for giving it a run wongjiahau & littledivy!

Copy link
Contributor Author

@tamusjroyce tamusjroyce left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@wongjiahau pinging again for another PR. Was able to reproduce the errors in the pipeline local. After updating lexical-core using cargo, the rust build succeeded. swc-wasm/wasm.js was updated as well.

The three deno examples worked local. But I am still green when it comes to rust.

@tamusjroyce
Copy link
Contributor Author

Will leave bumping swc to a future PR

PS C:\Users\Owner\Projects\deno_swc\swc_wasm> cargo update
Updating crates.io index
Updating git repository https://github.com/swc-project/swc
Updating aho-corasick v0.7.13 -> v0.7.18
Updating anyhow v1.0.31 -> v1.0.42
Updating arrayvec v0.5.1 -> v0.5.2
Updating autocfg v1.0.0 -> v1.0.1
Updating bumpalo v3.4.0 -> v3.7.0
Updating byteorder v1.3.4 -> v1.4.3
Updating const-random v0.1.8 -> v0.1.13
Updating const-random-macro v0.1.8 -> v0.1.13
Adding crunchy v0.2.2
Updating dashmap v3.5.1 -> v3.11.10
Updating either v1.5.3 -> v1.6.1
Adding form_urlencoded v1.0.1
Removing getrandom v0.1.14
Adding getrandom v0.1.16
Adding getrandom v0.2.3
Updating hashbrown v0.8.1 -> v0.11.2
Updating hermit-abi v0.1.15 -> v0.1.19
Updating idna v0.2.0 -> v0.2.3
Updating if_chain v1.0.0 -> v1.0.1
Updating indexmap v1.5.0 -> v1.7.0
Updating is-macro v0.1.8 -> v0.1.9
Updating itoa v0.4.6 -> v0.4.7
Updating js-sys v0.3.45 -> v0.3.51
Updating libc v0.2.72 -> v0.2.98
Updating log v0.4.11 -> v0.4.14
Updating memchr v2.3.3 -> v2.4.0
Updating num-integer v0.1.43 -> v0.1.44
Updating num-traits v0.2.12 -> v0.2.14
Updating once_cell v1.4.0 -> v1.8.0
Updating ordered-float v1.1.0 -> v1.1.1
Updating ppv-lite86 v0.2.8 -> v0.2.10
Updating proc-macro-hack v0.5.16 -> v0.5.19
Updating proc-macro2 v1.0.18 -> v1.0.27
Updating quote v1.0.7 -> v1.0.9
Updating regex v1.3.9 -> v1.5.4
Updating regex-syntax v0.6.18 -> v0.6.25
Updating serde v1.0.114 -> v1.0.126
Updating serde_derive v1.0.114 -> v1.0.126
Updating serde_json v1.0.56 -> v1.0.64
Updating siphasher v0.3.3 -> v0.3.5
Removing smallvec v0.6.13
Removing smallvec v1.4.1
Adding smallvec v0.6.14
Adding smallvec v1.6.1
Updating string_cache v0.8.0 -> v0.8.1
Updating syn v1.0.34 -> v1.0.73
Removing thread_local v1.0.1
Adding tiny-keccak v2.0.2
Updating tinyvec v0.3.3 -> v1.2.0
Adding tinyvec_macros v0.1.0
Updating unicode-bidi v0.3.4 -> v0.3.5
Updating unicode-normalization v0.1.13 -> v0.1.19
Updating unicode-xid v0.2.1 -> v0.2.2
Updating url v2.1.1 -> v2.2.2
Updating version_check v0.9.2 -> v0.9.3
Updating walkdir v2.3.1 -> v2.3.2
Adding wasi v0.10.2+wasi-snapshot-preview1
Updating wasm-bindgen v0.2.68 -> v0.2.74
Updating wasm-bindgen-backend v0.2.68 -> v0.2.74
Updating wasm-bindgen-macro v0.2.68 -> v0.2.74
Updating wasm-bindgen-macro-support v0.2.68 -> v0.2.74
Updating wasm-bindgen-shared v0.2.68 -> v0.2.74
...
error[E0603]: module private is private
--> C:\Users\Owner.cargo\git\checkouts\swc-594f88c93b4170b2\6b03c65\ecmascript\jsdoc\src\ast.rs:30:1
|
30 | #[ast_node]
| ^^^^^^^^^^^ private module
|
note: the module private is defined here
--> C:\Users\Owner.cargo\registry\src\github.com-1ecc6299db9ec823\serde-1.0.126\src\lib.rs:277:5
|
277 | use self::__private as private;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0603]: module private is private
--> C:\Users\Owner.cargo\git\checkouts\swc-594f88c93b4170b2\6b03c65\ecmascript\jsdoc\src\ast.rs:238:1
|
238 | #[ast_node]
| ^^^^^^^^^^^ private module
|
note: the module private is defined here
--> C:\Users\Owner.cargo\registry\src\github.com-1ecc6299db9ec823\serde-1.0.126\src\lib.rs:277:5
|
277 | use self::__private as private;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0603]: module private is private
--> C:\Users\Owner.cargo\git\checkouts\swc-594f88c93b4170b2\6b03c65\ecmascript\jsdoc\src\ast.rs:356:1
|
356 | #[ast_node]
| ^^^^^^^^^^^ private module
|
note: the module private is defined here
--> C:\Users\Owner.cargo\registry\src\github.com-1ecc6299db9ec823\serde-1.0.126\src\lib.rs:277:5
|
277 | use self::__private as private;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^

(if you notice PS>, I am glad to support powershell via vscode. But I do strongly dislike any tcl-based language! I will never support how arrays work in PS >.<)

@wongjiahau
Copy link
Collaborator

@tamusjroyce LGTM

/cc @littledivy

Copy link
Owner

@littledivy littledivy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks for the PR @tamusjroyce.

@littledivy littledivy merged commit dbec608 into littledivy:master Jul 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants