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 turbopack-nightly-release.yml #25

Open
wants to merge 17 commits into
base: main
Choose a base branch
from
Open

Conversation

X-oss-byte
Copy link
Owner

Description

Testing Instructions

@stackblitz
Copy link

stackblitz bot commented Jul 29, 2023

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@github-actions
Copy link

github-actions bot commented Jul 29, 2023

⚠️ CI failed ⚠️

The following steps have failed in CI:

  • Go unit tests
  • Turborepo examples
  • Turborepo e2e tests
  • Go integration tests
  • Turborepo Rust checks
  • Turbopack Rust checks
  • Turbopack Typescript checks
  • Formatting

See workflow summary for details

wbinnssmith and others added 16 commits July 31, 2023 11:50
Windows sorts the environment variables returned, breaking snapshot
tests.
ast-grep[0] is a tool that uses tree-sitter[1] and a pattern language to
match against code using its ast. It implements code transformation,
querying, and linting.

Since clippy isn't extensible for project-specific lints, this adds a
first ast-grep lint disallowing `context` as a variable name. Currently
it's set to warning as usage is addressed.

To run, install ast-grep, then run `ast-grep scan`. Example output:

```
warning[no-context]: Don't name variables `context`.
    ┌─ ./crates/turbopack-ecmascript-hmr-protocol/src/lib.rs:132:9
    │
132 │     pub context: &'a str,
    │     ----^^^^^^^---------
    │
    = Use a more specific name, such as chunking_context, asset_context, etc.
```

[0] https://ast-grep.github.io
[1] https://tree-sitter.github.io/tree-sitter/
### Description

switch the daily next integration test run to use `--experimental-turbo`
### Description

The Vc update broke some tracing span names
…rcel#5597)

This implements build minification for turbopack-cli build and on the
node build chunking context, using swc minify. It required adapting
swc's public minification code to produce `SourceMap`s to avoid
generating and re-parsing source maps.

Test Plan:

Input: `src/index.js`:

```
let myVar = 3;
console.log("foo", myVar);
```

Output:

```
module.exports={"[output]/src/index.js (ecmascript)":function({r:__turbopack_require__,f:__turbopack_require_context__,i:__turbopack_import__,s:__turbopack_esm__,v:__turbopack_export_value__,n:__turbopack_export_namespace__,c:__turbopack_cache__,l:__turbopack_load__,j:__turbopack_dynamic__,g:global,__dirname,m:module,e:exports}){function(){console.log("foo",3)}.call(this)}};

//# sourceMappingURL=[output]_src_index_e254c5.js.map
```

- Verified source map matched input tokens.
Signed-off-by: Ethereum  <136061549+sammyfilly@users.noreply.github.com>
### Description

Update `swc_core` to
swc-project/swc@00a0575

### Testing Instructions

See vercel/next.js#53308


---

Closes WEB-1327
### Description

Ported both of these and connected to the run outline. I eschewed using
a trait because the function signatures are not identical between `fs`
and `http`, plus it's only two caches so there's no need for too much
abstraction.

### Testing Instructions

<!--
  Give a quick description of steps to test your changes.
-->

---------

Co-authored-by: nicholaslyang <Nicholas Yang>
### Description

sync next.js and turbo
This migrates some crates away from using `context`, specifically:

- `node-file-trace`
- `turbo-tasks-build`
- `turbo-tasks-fetch`
- `turbo-tasks`
- `turbopack-build`
- `turbopack-cli-utils`
- `turbopack-cli`
- `turbopack-core`
- `turbopack-ecmascript`

This also moves the lint to `error` and ignores other failing crates.
This migrates `turbopack-core` to the no-context rule.

Notably, this addresses an issue where function names were not caught
and renames `Issue`'s `context` method to `file_path`.
Signed-off-by: Ethereum  <136061549+sammyfilly@users.noreply.github.com>
@CLAassistant
Copy link

CLAassistant commented Aug 12, 2023

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 7 committers have signed the CLA.

✅ sammyfilly
❌ OJ Kwon
❌ ForsakenHarmony
❌ wbinnssmith
❌ NicholasLYang
❌ kdy1
❌ sokra


OJ Kwon seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants