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

Make bundles fully standalone. #3325

Merged
merged 3 commits into from Nov 13, 2019

Conversation

@kitsonk
Copy link
Contributor

kitsonk commented Nov 13, 2019

Refs #2475

This isn't all of Bundling "v2" but it is an improvement. This PR provides:

  • Bundles are fully standalone. They now include the shared loader with deno_typescript.
  • Refactor of the loader in deno_typescript to perform module instantiation in a more
  • Change of behaviour when an output file is not specified on the CLI. Previously a default name was determined and the bundle written to that file, now the bundle will be sent to stdout.
  • Refactors in the TypeScript compiler to be able to support the concept of a request type. This provides a cleaner abstraction and makes it easier to support things like single module transpiles to the userland.
  • Remove a "dangerous" circular dependency between os.ts and deno.ts, and define pid and noColor in a better way.
  • Don't bind early to console in repl.ts.
  • Add an integration test for generating a bundle.
Refs #2475
@kitsonk

This comment has been minimized.

Copy link
Contributor Author

kitsonk commented Nov 13, 2019

Ooops... missed that there was a bundling benchmark that I broke.

cli/flags.rs Show resolved Hide resolved
deno_typescript/lib.rs Show resolved Hide resolved
std/bundle/README.md Outdated Show resolved Hide resolved
@ry
ry approved these changes Nov 13, 2019
Copy link
Collaborator

ry left a comment

LGTM - nice work @kitsonk - cleanly done!

@ry ry merged commit 8d03397 into denoland:master Nov 13, 2019
9 checks passed
9 checks passed
test macOS-latest
Details
test_std macOS-latest
Details
test windows-2019
Details
test_std windows-2019
Details
test ubuntu-16.04
Details
test_debug ubuntu-16.04
Details
test_std ubuntu-16.04
Details
bench ubuntu-16.04
Details
lint ubuntu-16.04
Details
@ry

This comment has been minimized.

Copy link
Collaborator

ry commented Nov 13, 2019

This improved the bundle size. I'm not sure how tho...

Screen Shot 2019-11-13 at 11 00 56 AM

ry added a commit to ry/deno that referenced this pull request Nov 14, 2019
This patch does not work with the recent bundler changes (denoland#3325).
Unfortunately I didn't merge master before landing this patch. It has
something to do with console.log not working inside the compiler worker.

This reverts commit fd62379.
ry added a commit that referenced this pull request Nov 14, 2019
This patch does not work with the recent bundler changes (#3325).
Unfortunately I didn't merge master before landing this patch. It has
something to do with console.log not working inside the compiler worker.

This reverts commit fd62379.
axetroy added a commit to axetroy/deno that referenced this pull request Nov 15, 2019
fix lint

format code

fix

format rust code

update arg name

refactor: per-worker resource table (denoland#3306)

- removes global `RESOURCE_TABLE` - resource tables are now created per `Worker`
  in `State`
- renames `CliResource` to `StreamResource` and moves all logic related
  to it to `cli/ops/io.rs`
- removes `cli/resources.rs`
- adds `state` argument to `op_read` and `op_write` and consequently adds
  `stateful_minimal_op` to `State`
- IMPORTANT NOTE: workers don't have access to process stdio - this is
  caused by fact that dropping worker would close stdout for process
  (because it's constructed from raw handle, which closes underlying file
  descriptor on drop)

Revert "refactor: per-worker resource table (denoland#3306)"

This patch does not work with the recent bundler changes (denoland#3325).
Unfortunately I didn't merge master before landing this patch. It has
something to do with console.log not working inside the compiler worker.

This reverts commit fd62379.

Loader: support .wasm imports (denoland#3328)

* loader: support .wasm imports

* http_server: true

* Support named exports

* Clippy

add RUST_BACKTRACE to ci

refactor: per-worker resource table, take 2 (denoland#3342)

- removes global `RESOURCE_TABLE` - resource tables are now created per `Worker`
  in `State`
- renames `CliResource` to `StreamResource` and moves all logic related
  to it to `cli/ops/io.rs`
- removes `cli/resources.rs`
- adds `state` argument to `op_read` and `op_write` and consequently adds
  `stateful_minimal_op` to `State`
- IMPORTANT NOTE: workers don't have access to process stdio - this is
  caused by fact that dropping worker would close stdout for process
  (because it's constructed from raw handle, which closes underlying file
  descriptor on drop)

Turn on TS strict mode for deno_typescript (denoland#3330)

improve test

add test output message for debug

try fix

update

update

fix lint

disable test

update

update

debug

debug msg

trigger ci

trigger ci 1

update

update

format code
axetroy added a commit to axetroy/deno that referenced this pull request Nov 15, 2019
This patch does not work with the recent bundler changes (denoland#3325).
Unfortunately I didn't merge master before landing this patch. It has
something to do with console.log not working inside the compiler worker.

This reverts commit fd62379.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants
You can’t perform that action at this time.