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

feat(compilation): add ImportModule and executeModule #4718

Merged

Conversation

JSerFeng
Copy link
Collaborator

@JSerFeng JSerFeng commented Nov 20, 2023

Summary

implement context.importModule and compilation.executeModule

Test Plan

Require Documentation?

  • No
  • Yes, the corresponding rspack-website PR is __

@github-actions github-actions bot added release: feature release: feature related release(mr only) team The issue/pr is created by the member of Rspack. labels Nov 20, 2023
@JSerFeng JSerFeng force-pushed the 11-20-feat_compilation_add_pluginImport_and_executeModule branch from 98452b5 to 4c8c5b1 Compare November 20, 2023 12:14
@JSerFeng JSerFeng force-pushed the 11-20-chore_use_eprintln_to_report_error_for_runtime_requirements branch from d02f4ef to 0205602 Compare November 20, 2023 13:41
@JSerFeng JSerFeng force-pushed the 11-20-feat_compilation_add_pluginImport_and_executeModule branch 2 times, most recently from 65b5d99 to 5833f01 Compare November 20, 2023 13:48
Base automatically changed from 11-20-chore_use_eprintln_to_report_error_for_runtime_requirements to main November 21, 2023 11:17
@JSerFeng JSerFeng force-pushed the 11-20-feat_compilation_add_pluginImport_and_executeModule branch from 5833f01 to 57ebb5b Compare November 21, 2023 11:37
@JSerFeng JSerFeng self-assigned this Nov 21, 2023
@JSerFeng JSerFeng changed the base branch from main to 11-22-feat_plugin-driver_add_execute_module November 22, 2023 05:58
@JSerFeng JSerFeng force-pushed the 11-20-feat_compilation_add_pluginImport_and_executeModule branch from 57ebb5b to 3f35b93 Compare November 22, 2023 05:58
@JSerFeng JSerFeng marked this pull request as ready for review November 22, 2023 05:59
@JSerFeng JSerFeng marked this pull request as draft November 22, 2023 06:03
Base automatically changed from 11-22-feat_plugin-driver_add_execute_module to main November 22, 2023 06:53
@JSerFeng JSerFeng force-pushed the 11-20-feat_compilation_add_pluginImport_and_executeModule branch from 3f35b93 to fab7b5c Compare November 22, 2023 14:12
@JSerFeng JSerFeng changed the base branch from main to 11-23-feat_WorkerQueue_support_queue.wait_for November 23, 2023 14:58
@JSerFeng JSerFeng force-pushed the 11-20-feat_compilation_add_pluginImport_and_executeModule branch from fab7b5c to 1f9281e Compare November 23, 2023 14:58
@JSerFeng JSerFeng force-pushed the 11-20-feat_compilation_add_pluginImport_and_executeModule branch from 1f9281e to 64e1e68 Compare November 23, 2023 15:13
@JSerFeng JSerFeng changed the base branch from 11-23-feat_WorkerQueue_support_queue.wait_for to main November 24, 2023 04:05
@JSerFeng JSerFeng force-pushed the 11-25-feat_compilation_add_queue_handlers_representing_task_queue branch from 3837453 to 435726f Compare January 12, 2024 13:57
@JSerFeng JSerFeng force-pushed the 11-20-feat_compilation_add_pluginImport_and_executeModule branch from e9a522e to e1bf873 Compare January 12, 2024 13:57
@JSerFeng JSerFeng force-pushed the 11-25-feat_compilation_add_queue_handlers_representing_task_queue branch 2 times, most recently from 51880dc to 17dd0b9 Compare January 17, 2024 04:32
@JSerFeng JSerFeng force-pushed the 11-20-feat_compilation_add_pluginImport_and_executeModule branch from e1bf873 to e170e6b Compare January 17, 2024 04:32
@JSerFeng JSerFeng force-pushed the 11-25-feat_compilation_add_queue_handlers_representing_task_queue branch from 17dd0b9 to 35e60dd Compare January 17, 2024 04:41
Base automatically changed from 11-25-feat_compilation_add_queue_handlers_representing_task_queue to main January 17, 2024 04:55
@JSerFeng JSerFeng force-pushed the 11-20-feat_compilation_add_pluginImport_and_executeModule branch 8 times, most recently from 1617ae3 to 9ce9698 Compare January 22, 2024 11:50
ahabhgk
ahabhgk previously approved these changes Jan 22, 2024
@JSerFeng JSerFeng force-pushed the 11-20-feat_compilation_add_pluginImport_and_executeModule branch from 9ce9698 to 43bd8ad Compare January 22, 2024 12:04
@JSerFeng JSerFeng enabled auto-merge (squash) January 22, 2024 12:05
@JSerFeng
Copy link
Collaborator Author

Failed test can be fixed by #5397

@JSerFeng JSerFeng force-pushed the 11-20-feat_compilation_add_pluginImport_and_executeModule branch 2 times, most recently from b52ad08 to 2758225 Compare January 23, 2024 07:00
Copy link
Contributor

Test Compatibility Diff

main pr diff
73.565% 86.565% ✅ ⏫ 13.000
Unpassed tests

1 🟡 ConfigTestCases loader-import-module css css: #4923
2 ⚪️ Examples aggressive-merging: TODO
3 ⚪️ Examples asset-advanced: TODO
7 ⚪️ Examples cjs-tree-shaking: TODO
11 ⚪️ Examples code-splitting-bundle-loader: TODO
20 ⚪️ Examples common-chunk-grandchildren: TODO
23 ⚪️ Examples custom-json-modules: TODO
24 ⚪️ Examples dll: TODO
25 ⚪️ Examples dll-app-and-vendor/0-vendor: TODO
26 ⚪️ Examples dll-app-and-vendor/1-app: TODO
27 ⚪️ Examples dll-entry-only: TODO
28 ⚪️ Examples dll-user: TODO
29 ⚪️ Examples explicit-vendor-chunk: TODO
37 ⚪️ Examples http2-aggressive-splitting: TODO
39 ⚪️ Examples lazy-compilation: TODO
45 ⚪️ Examples module-federation: TODO
52 ⚪️ Examples persistent-caching: TODO
61 ⚪️ Examples typescript: TODO
65 🔴 TestCases normal amd define-needs-module: #4313
66 🔴 TestCases normal amd namedModules: #4313
67 🔴 TestCases normal amd namedModulesConstArrayDep: #4313
104 🔴 TestCases normal chunks context: #4304
105 🔴 TestCases normal chunks inline-options: #4306
106 🔴 TestCases normal chunks named-chunks: #4304
107 🔴 TestCases normal chunks nested-in-empty: #4304
108 🔴 TestCases normal chunks parsing: #4304
109 🔴 TestCases normal chunks runtime: #4304
110 🔴 TestCases normal chunks var-inject-error-handler: #4304
111 🟡 TestCases normal chunks weak-dependencies: #2787
112 🔴 TestCases normal chunks weak-dependencies-context: #4315
153 🔴 TestCases normal cjs-interop non-existing-export: #4323
154 🟡 TestCases normal cjs-tree-shaking bailouts: #4313
155 🟡 TestCases normal cjs-tree-shaking mutate: #4323
156 🔴 TestCases normal cjs-tree-shaking reexports: #4424
234 🔴 TestCases normal compile deduplication-bundle-loader: #4304
235 🔴 TestCases normal compile error-hide-stack: #4326
248 🔴 TestCases normal context import-meta-webpack-context: #4305
249 🔴 TestCases normal context issue-10969: #4329
250 🔴 TestCases normal context issue-5750: #4328
295 🟡 TestCases normal errors crash-missing-import: #4348
296 🟡 TestCases normal errors harmony-import-missing: #4348
297 🟡 TestCases normal errors harmony-import-missing2: #4348
298 🔴 TestCases normal errors load-module-cycle: #3738
299 🔴 TestCases normal errors load-module-cycle-multiple: #3738
300 🔴 TestCases normal errors load-module-error: #3738
301 🟡 TestCases normal errors loader-error-warning: #4349
302 🟡 TestCases normal errors mjs-non-fully-specified: #4348
303 🟡 TestCases normal errors module-request: #4348
312 🟡 TestCases normal esm import-meta: #4350
377 🟡 TestCases normal json default-default-with-concatenation: #3823
378 🔴 TestCases normal json import-assertions-type-json: #4358
379 🔴 TestCases normal json import-by-name: #4323
380 🟡 TestCases normal json import-by-name-with-concatenation: #3823, #4323
381 🟡 TestCases normal json import-with-default-with-concatenation: #3823
382 🟡 TestCases normal json reexport: #4323
408 🔴 TestCases normal large big-assets: #3180
409 ⚪️ TestCases normal large many-replacements: TODO
410 🔴 TestCases normal loaders context: #4397
411 🔴 TestCases normal loaders import-module: #4398
412 🔴 TestCases normal loaders issue-10725: blocked by this.loadModule #3738
413 🔴 TestCases normal loaders issue-2299: blocked by this.loadModule #3738
414 🔴 TestCases normal loaders issue-4959: blocked by this.loadModule #3738
415 🔴 TestCases normal loaders no-string: blocked by #3459
416 🟡 TestCases normal loaders query: #4397
417 🔴 TestCases normal loaders resolve: #3180
418 🔴 TestCases normal loaders utils: #4397
460 🟡 TestCases normal mjs non-enumerable: #4323
461 🟡 TestCases normal mjs type-module: #3544, #5197
507 🔴 TestCases normal nonce set-nonce: #4401
508 🔴 TestCases normal optimize side-effects-reexport-start-unknown: new tree-shaking re-implementation
568 🔴 TestCases normal parsing amd-rename: #4313
569 🟡 TestCases normal parsing chunks: #4304
570 🟡 TestCases normal parsing complex-require: #4304, #4313
571 🔴 TestCases normal parsing context: #3346
572 🔴 TestCases normal parsing declared-api: #4313
573 🔴 TestCases normal parsing es6.nominimize: #4304
574 🔴 TestCases normal parsing evaluate: #4424
575 🔴 TestCases normal parsing evaluate-nullish: #4424
576 🔴 TestCases normal parsing extract-amd: #4313
577 🔴 TestCases normal parsing extract-amd.nominimize: #4313
578 🔴 TestCases normal parsing extract-require: #4424
579 🔴 TestCases normal parsing harmony-deep-exports: #4426
580 🔴 TestCases normal parsing harmony-duplicate-export: #4323
581 🔴 TestCases normal parsing harmony-export-import-specifier: #4426
582 🔴 TestCases normal parsing harmony-export-precedence: #4323
583 🔴 TestCases normal parsing harmony-info: #4323
584 🔴 TestCases normal parsing harmony-injecting-order: #4313
585 🔴 TestCases normal parsing harmony-reexport: new treeshaking re-implementation
586 🔴 TestCases normal parsing harmony-star-conflict: #4118, #4323
587 🔴 TestCases normal parsing issue-2084: #4313
588 🔴 TestCases normal parsing issue-2600: #4348
589 🔴 TestCases normal parsing issue-2641: #4313
590 ⚪️ TestCases normal parsing issue-3252: TODO
591 ⚪️ TestCases normal parsing issue-3273: TODO
592 🔴 TestCases normal parsing issue-345: #4313
593 🔴 TestCases normal parsing issue-387: #4313
594 🔴 TestCases normal parsing issue-4596: #4424
595 🔴 TestCases normal parsing issue-4940: #4313
596 🔴 TestCases normal parsing issue-627: #4429
597 🔴 TestCases normal parsing issue-758: #4313, #4304
598 🔴 TestCases normal parsing issue-7778: #4450
599 🔴 TestCases normal parsing local-modules: #4313
600 🔴 TestCases normal parsing missing-export-warning-nested: #4323
601 🔴 TestCases normal parsing nullish-coalescing: #4300
602 🔴 TestCases normal parsing precreated-ast: #4442
603 🔴 TestCases normal parsing renaming: #4313, #3346
604 🔴 TestCases normal parsing resolve-weak-context: #4315
605 🔴 TestCases normal parsing strict-mode: #4313
606 🔴 TestCases normal parsing typeof: #4424
607 🔴 TestCases normal parsing unsupported-amd: #4313
1011 🔴 TestCases normal resolving commomjs-local-module: #4313
1012 🔴 TestCases normal resolving context: #4397
1013 🔴 TestCases normal resolving data-uri: #4445
1014 🔴 TestCases normal resolving issue-2986: #4348
1044 🔴 TestCases normal runtime chunk-callback-order: #4313
1045 🔴 TestCases normal runtime error-handling: #4348
1046 🔴 TestCases normal runtime issue-15518: #4306
1047 🔴 TestCases normal runtime missing-module-exception: #4348
1048 🔴 TestCases normal runtime missing-module-syntax-error: #4348
1049 🔴 TestCases normal runtime module-caching: #4304
1066 ⚪️ TestCases normal scope-hoisting async-keyword-5615: TODO
1067 ⚪️ TestCases normal scope-hoisting chained-reexport: TODO
1068 ⚪️ TestCases normal scope-hoisting circular-external: TODO
1069 ⚪️ TestCases normal scope-hoisting circular-namespace-object: TODO
1070 ⚪️ TestCases normal scope-hoisting circular-root-export: TODO
1071 ⚪️ TestCases normal scope-hoisting delete-issue-10831: TODO
1072 ⚪️ TestCases normal scope-hoisting esModule: TODO
1073 ⚪️ TestCases normal scope-hoisting export-namespace: TODO
1074 ⚪️ TestCases normal scope-hoisting external-root: TODO
1075 ⚪️ TestCases normal scope-hoisting import-order: TODO
1076 ⚪️ TestCases normal scope-hoisting import-order-11617: TODO
1077 ⚪️ TestCases normal scope-hoisting indirect-reexport: TODO
1078 ⚪️ TestCases normal scope-hoisting inside-class: TODO
1079 ⚪️ TestCases normal scope-hoisting intra-references: TODO
1080 ⚪️ TestCases normal scope-hoisting issue-10308: TODO
1081 ⚪️ TestCases normal scope-hoisting issue-10409: TODO
1082 ⚪️ TestCases normal scope-hoisting issue-11840: TODO
1083 ⚪️ TestCases normal scope-hoisting issue-11897: TODO
1084 ⚪️ TestCases normal scope-hoisting issue-5020: TODO
1085 ⚪️ TestCases normal scope-hoisting issue-5020-minimal: TODO
1086 ⚪️ TestCases normal scope-hoisting issue-5096: TODO
1087 ⚪️ TestCases normal scope-hoisting issue-5314: TODO
1088 ⚪️ TestCases normal scope-hoisting issue-5443: TODO
1089 ⚪️ TestCases normal scope-hoisting issue-5481: TODO
1090 ⚪️ TestCases normal scope-hoisting issue-6407: TODO
1091 ⚪️ TestCases normal scope-hoisting issue-7930: TODO
1092 ⚪️ TestCases normal scope-hoisting json-reexport-6700: TODO
1093 ⚪️ TestCases normal scope-hoisting name-conflicts: TODO
1094 ⚪️ TestCases normal scope-hoisting order-without-side-effects: TODO
1095 ⚪️ TestCases normal scope-hoisting orphan: TODO
1096 ⚪️ TestCases normal scope-hoisting reexport-cjs: TODO
1097 ⚪️ TestCases normal scope-hoisting reexport-exposed-cjs: TODO
1098 ⚪️ TestCases normal scope-hoisting reexport-exposed-default-cjs: TODO
1099 ⚪️ TestCases normal scope-hoisting reexport-exposed-harmony: TODO
1100 ⚪️ TestCases normal scope-hoisting reexport-star-exposed-cjs: TODO
1101 ⚪️ TestCases normal scope-hoisting reexport-star-external-cjs: TODO
1102 ⚪️ TestCases normal scope-hoisting renaming-4967: TODO
1103 ⚪️ TestCases normal scope-hoisting renaming-shorthand-5027: TODO
1104 ⚪️ TestCases normal scope-hoisting require-root-5604: TODO
1105 ⚪️ TestCases normal scope-hoisting side-effects-11662: TODO
1106 ⚪️ TestCases normal scope-hoisting side-effects-11990: TODO
1107 ⚪️ TestCases normal scope-hoisting side-effects-11990-star: TODO
1108 ⚪️ TestCases normal scope-hoisting side-effects-9159: TODO
1109 ⚪️ TestCases normal scope-hoisting simple: TODO
1110 ⚪️ TestCases normal scope-hoisting this-in-import: TODO
1111 ⚪️ TestCases normal side-effects dynamic-reexports: TODO
1148 ⚪️ TestCases normal wasm v128: TODO

@JSerFeng JSerFeng force-pushed the 11-20-feat_compilation_add_pluginImport_and_executeModule branch from 2758225 to 871f436 Compare January 23, 2024 07:22
@JSerFeng JSerFeng force-pushed the 11-20-feat_compilation_add_pluginImport_and_executeModule branch from 871f436 to 7023168 Compare January 23, 2024 07:28
@JSerFeng JSerFeng merged commit 5639610 into main Jan 23, 2024
17 checks passed
@JSerFeng JSerFeng deleted the 11-20-feat_compilation_add_pluginImport_and_executeModule branch January 23, 2024 07:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release: feature release: feature related release(mr only) team The issue/pr is created by the member of Rspack.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants