[pull] main from swiftwasm:main#7
Open
pull[bot] wants to merge 1250 commits into
Open
Conversation
So that we can use it for Swift code generation
[NFC] BridgeJS: Move CodeFragmentPrinter to BridgeJSCore
…er-return BridgeJS: Fix optional Swift heap object handling for imported interface
Prepare to extend the context more
BridgeJS: Add `IntrinsicJSFragment.PrintCodeContext`
BridgeJS: Unify closure JS glue lift/lower
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 4 to 6. - [Release notes](https://github.com/actions/setup-node/releases) - [Commits](actions/setup-node@v4...v6) --- updated-dependencies: - dependency-name: actions/setup-node dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
…s and struct associated values
…ons/setup-node-6 Bump actions/setup-node from 4 to 6
BridgeJS: Fix incorrect TypeScript type names for `tsEnum`-style enums and struct associated values
- Rename `optionalRepresentation` to `asOptional`. - Remove `undefinedValue` static property and use `.undefined` case directly.
BridgeJS: Update `JSUndefinedOr` APIs
to be consistent with other environment variables used by BridgeJS.
BridgeJS: Include source-context in diagnostic messages
BridgeJS: Fix reject path of zero-parameter async throwing exports
* drop swift 6.1 * fix ci matrix * Detach async JS bridge tasks * Stabilize identity GC test * Revert detached async bridge tasks * Use Swift 6.2.4 in CI * Use Swift 6.2.3 in CI * Drop Swift 6.2 from CI * Document minimum Swift version * Add MSSV section to README * Fix async closure test formatting * Move tracing override to 24.04 matrix entry
* Use latest snapshot toolchain * Use native build system for examples * Use native build system in PackageToJS tests * Fix build-examples CI hang * Apply formatter output * Match formatter whitespace
…paths (#764) * BridgeJS: support associated-value enums in import and async paths * Format Swift sources * Match Swift 6.1 formatter output
BridgeJS: Support throws and async for closures
…tions BridgeJS: Normalize wasm pointer offsets in JS
Bumps [actions/checkout](https://github.com/actions/checkout) from 6 to 7. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](actions/checkout@v6...v7) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '7' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
The `declare global { namespace ... }` class stub rendered every method
without `static` and filtered properties to instance-only, so a `@JS static
func` on a namespaced class was typed as an instance method and a `@JS
static var` was omitted from the generated `.d.ts`.
This was a type-only defect: the emitted JavaScript already exposes these
members statically (and the class's namespace export entry types them
correctly), so only TypeScript consumers were affected. Split static and
instance members in this path: emit static methods with `static` and
include static properties.
This has been incorrect since the global namespace class stub was
introduced, not a regression. The `Namespaces.Global` snapshot already
exercises a namespaced class with `static func`/`static var` but had
recorded the wrong output, so it is updated to the corrected declarations.
…members BridgeJS: Emit static members in declare global class declarations
Propagate Swift `///` and `/** */` documentation on exported declarations into the generated TypeScript declarations as JSDoc, so editors surface hover docs for the bridged API. The exporter now captures the leading doc comment for functions, classes, methods, properties, constructors, structs, and enums into the skeleton, and the linker renders it as a single JSDoc block. The Swift DocC field list is mapped as the inverse of the TS2Swift importer: the leading description becomes the JSDoc body, `- Parameters:`/`- Parameter x:` become `@param`, `- Returns:` becomes `@returns`, and `- Throws:` becomes `@throws`. Existing default-value annotations are merged into the same block so a parameter never emits two comment blocks; declarations without doc comments produce byte-identical output to before.
BridgeJS: Include Swift doc comments in generated d.ts
The `build-examples` job built all examples sequentially in a single job, taking ~57 minutes - each example is its own SwiftPM package that recompiles JavaScriptKit and swift-syntax from scratch, with no sharing between them. Split the job by event: - Pull requests fan out a matrix `build-examples` with one job per example, built in parallel. Wall-clock drops to that of the slowest single example (~10 min). Each example now reports as a separate `build-examples (<name>)` check, so the required status checks need updating (see PR description). - `main` keeps the full release build of all examples plus the GitHub Pages deploy (`build-examples-deploy`), so published artifacts are unchanged. Examples are built in release to match the deploy path, keeping the only behavioral change the parallelism. Each matrix step runs `build.sh` from the example directory (via `working-directory`), mirroring Utilities/build-examples.sh.
Follow-up to the review on #750: - ImportTS: give the unreachable `.alias` cases in loweringParameterInfo / liftingReturnInfo a message stating the `.unaliased` invariant, so a future change that breaks it fails loudly instead of trapping silently. - JSGlueGen: in `optionalConvention` and `wasmParams`, delegate `.alias` to its underlying type rather than `preconditionFailure()`. These switch on `self` (not `.unaliased`), so this removes a latent crash for alias-wrapped values and matches how abiReturnType / mangleTypeName already handle `.alias`. - SwiftToSkeleton: diagnose `@JS(as:)` combined with `namespace:` instead of silently dropping the namespace; an alias adopts its representation's placement. Adds a diagnostics test. - BridgeJSSkeleton: note why alias mangling uses the (unique) swiftCallName only. - Docs: add an "Exporting a Type With a Custom JS Representation" article and link it from the exporting topics.
BridgeJS: Export types using a separate JS representation
BridgeJS: Fix issues exporting nested types
…oding BridgeJS: Unify optional stack encoding to presence-flag form
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 6 to 7. - [Release notes](https://github.com/actions/setup-node/releases) - [Commits](actions/setup-node@v6...v7) --- updated-dependencies: - dependency-name: actions/setup-node dependency-version: '7' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )