Skip to content

fix: prevent resolution error caused by #[wasm_action]#122

Merged
oakcask merged 6 commits intomainfrom
fix_-prevent-resolution-error-caused-by-___wasm_action__-dah01kbsjxy2yq6m1ch1xgahq172q
Dec 6, 2025
Merged

fix: prevent resolution error caused by #[wasm_action]#122
oakcask merged 6 commits intomainfrom
fix_-prevent-resolution-error-caused-by-___wasm_action__-dah01kbsjxy2yq6m1ch1xgahq172q

Conversation

@oakcask
Copy link
Owner

@oakcask oakcask commented Dec 6, 2025

When user defines Action struct in their library crate while importing Action from wasm-actions, #[wasm_action] generates problematic code causes a failure of name resolution. The compilation error will be super confusing, meaning that the user will not be able to find out what happening.

This fix prevents such error from happening, by providing implmentation needed for GitHub Action entrypoint from wasm-actions-prelude library as Action trait's default implmentation, instead generating at compilation time.

When user defines `Action` struct in their library crate while
importing Action from wasm-actions, `#[wasm_action]` generates
problematic code causes a failure of name resolution. The compilation
error will be super confusing, meaning that the user will not be able
to find out what happening.

This fix prevents such error from happening, by providing
implmentation needed for GitHub Action entrypoint from
wasm-actions-prelude library as Action trait's default implmentation,
instead generating at compilation time.
@oakcask oakcask force-pushed the fix_-prevent-resolution-error-caused-by-___wasm_action__-dah01kbsjxy2yq6m1ch1xgahq172q branch from 697486e to dc0f22d Compare December 6, 2025 10:24
@oakcask oakcask merged commit f149fb7 into main Dec 6, 2025
21 checks passed
@oakcask oakcask deleted the fix_-prevent-resolution-error-caused-by-___wasm_action__-dah01kbsjxy2yq6m1ch1xgahq172q branch December 6, 2025 10:38
@oakcask-actions oakcask-actions bot mentioned this pull request Dec 6, 2025
oakcask added a commit that referenced this pull request Dec 7, 2025
`#[wasm_action]` generated following compilation error:

```
error[E0599]: no function or associated item named `start` found for struct `Action` in the current scope
  --> src/lib.rs:5:13
   |
 5 |     Action::start().into()
   |             ^^^^^ function or associated item not found in `Action`
...
```
oakcask added a commit that referenced this pull request Dec 7, 2025
`#[wasm_action]` generated following compilation error:

```
error[E0599]: no function or associated item named `start` found for struct `Action` in the current scope
  --> src/lib.rs:5:13
   |
 5 |     Action::start().into()
   |             ^^^^^ function or associated item not found in `Action`
...
```
oakcask pushed a commit that referenced this pull request Jan 4, 2026
🤖 I have created a release *beep* *boop*
---


<details><summary>wasm-actions: 0.7.1</summary>

##
[0.7.1](wasm-actions-v0.7.0...wasm-actions-v0.7.1)
(2026-01-04)


### Bug Fixes

* **deps:** update rust crate serde_json to 1.0.146
([#142](#142))
([28eddb2](28eddb2))
* **deps:** update rust crate serde_json to 1.0.147
([#144](#144))
([dd6a39b](dd6a39b))
* **deps:** update rust crate serde_json to 1.0.148
([#145](#145))
([2bd38f5](2bd38f5))
* re-export serde derive macro and serde_json
([#120](#120))
([aa6adf8](aa6adf8))
</details>

<details><summary>wasm-actions-build: 0.1.5</summary>

##
[0.1.5](wasm-actions-build-v0.1.4...wasm-actions-build-v0.1.5)
(2026-01-04)


### Bug Fixes

* **deps:** update rust crate serde_json to 1.0.146
([#142](#142))
([28eddb2](28eddb2))
* **deps:** update rust crate serde_json to 1.0.147
([#144](#144))
([dd6a39b](dd6a39b))
* **deps:** update rust crate serde_json to 1.0.148
([#145](#145))
([2bd38f5](2bd38f5))
* **deps:** update rust crate syn to 2.0.112
([#148](#148))
([ba09f74](ba09f74))
* **deps:** update rust crate syn to 2.0.113
([#157](#157))
([3b0a146](3b0a146))
</details>

<details><summary>wasm-actions-core: 0.10.0</summary>

##
[0.10.0](wasm-actions-core-v0.9.0...wasm-actions-core-v0.10.0)
(2026-01-04)


### ⚠ BREAKING CHANGES

* removes io::WritableStream from wasm-actions-node-sys.

### Bug Fixes

* **deps:** update rust crate tokio to 1.49.0
([#155](#155))
([4a5a266](4a5a266))
* fix wrongly typed stream API
([#124](#124))
([c75495f](c75495f))
</details>

<details><summary>wasm-actions-derive: 0.8.1</summary>

##
[0.8.1](wasm-actions-derive-v0.8.0...wasm-actions-derive-v0.8.1)
(2026-01-04)


### Bug Fixes

* **deps:** update rust crate proc-macro2 to 1.0.104
([#146](#146))
([908666e](908666e))
* **deps:** update rust crate syn to 2.0.112
([#148](#148))
([ba09f74](ba09f74))
* **deps:** update rust crate syn to 2.0.113
([#157](#157))
([3b0a146](3b0a146))
* fix the bug after
[#122](#122).
([#123](#123))
([9ff9bca](9ff9bca))
* fix undeclared type error generated by macro
([#119](#119))
([16f69b4](16f69b4))
* prevent resolution error caused by `#[wasm_action]`
([#122](#122))
([f149fb7](f149fb7))
* re-export serde derive macro and serde_json
([#120](#120))
([aa6adf8](aa6adf8))
</details>

<details><summary>wasm-actions-futures: 0.3.0</summary>

##
[0.3.0](wasm-actions-futures-v0.2.0...wasm-actions-futures-v0.3.0)
(2026-01-04)


### Features

* implement Into&lt;JoinHandle&lt;JsValue, JsValue&gt;&gt; for Promise
([#116](#116))
([5d0f411](5d0f411))
* provide shorthand type `UnknownPromise`
([#118](#118))
([d831344](d831344))


### Bug Fixes

* prevent resolution error caused by `#[wasm_action]`
([#122](#122))
([f149fb7](f149fb7))
</details>

<details><summary>wasm-actions-macro: 0.6.2</summary>

##
[0.6.2](wasm-actions-macro-v0.6.1...wasm-actions-macro-v0.6.2)
(2026-01-04)


### Bug Fixes

* **deps:** update rust crate syn to 2.0.112
([#148](#148))
([ba09f74](ba09f74))
* **deps:** update rust crate syn to 2.0.113
([#157](#157))
([3b0a146](3b0a146))
</details>

<details><summary>wasm-actions-node-sys: 0.3.0</summary>

##
[0.3.0](wasm-actions-node-sys-v0.2.0...wasm-actions-node-sys-v0.3.0)
(2026-01-04)


### ⚠ BREAKING CHANGES

* removes io::WritableStream from wasm-actions-node-sys.

### Features

* add child_process and relating interfaces
([#139](#139))
([c95e839](c95e839))
* add from_f64_clamping
([#133](#133))
([3c9424f](3c9424f))
* implement Display for Integer
([#138](#138))
([3c7fc0e](3c7fc0e))


### Bug Fixes

* fix wrongly typed stream API
([#124](#124))
([c75495f](c75495f))
</details>

<details><summary>wasm-actions-parse: 0.1.1</summary>

##
[0.1.1](wasm-actions-parse-v0.1.0...wasm-actions-parse-v0.1.1)
(2026-01-04)


### Bug Fixes

* **deps:** update rust crate proc-macro2 to 1.0.104
([#146](#146))
([908666e](908666e))
* **deps:** update rust crate syn to 2.0.112
([#148](#148))
([ba09f74](ba09f74))
* **deps:** update rust crate syn to 2.0.113
([#157](#157))
([3b0a146](3b0a146))
</details>

<details><summary>wasm-actions-prelude: 0.8.1</summary>

##
[0.8.1](wasm-actions-prelude-v0.8.0...wasm-actions-prelude-v0.8.1)
(2026-01-04)


### Bug Fixes

* prevent resolution error caused by `#[wasm_action]`
([#122](#122))
([f149fb7](f149fb7))
</details>

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

---------

Co-authored-by: oakcask-actions[bot] <206904404+oakcask-actions[bot]@users.noreply.github.com>
Co-authored-by: update-generated-files-action <41898282+github-actions[bot]@users.noreply.github.com>
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.

1 participant