-
Notifications
You must be signed in to change notification settings - Fork 0
Promote 20260422 #1
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
Open
myfreess
wants to merge
7
commits into
dev
Choose a base branch
from
promote-20260422
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
469c94a
promote
myfreess 3188899
need fix dependency: error from peter-jerry-ye/io
myfreess 8b03fc2
update ci
myfreess a25dac8
moon fmt
myfreess f288eb5
fix dependency
myfreess 4407d6c
moon info
myfreess 67d1a7d
fix wasm target
myfreess File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| name: check | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - master | ||
| - main | ||
| pull_request: | ||
|
|
||
| jobs: | ||
| check: | ||
| strategy: | ||
| fail-fast: false | ||
| runs-on: ubuntu-latest | ||
| continue-on-error: false | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| submodules: 'recursive' | ||
|
|
||
| - name: install | ||
| run: | | ||
| curl -fsSL https://cli.moonbitlang.com/install/unix.sh | bash | ||
| echo "$HOME/.moon/bin" >> $GITHUB_PATH | ||
|
|
||
| - name: moon version | ||
| run: | | ||
| moon version --all | ||
|
|
||
| - name: moon check | ||
| run: | | ||
| moon update | ||
| moon check --deny-warn | ||
|
|
||
| - name: moon info | ||
| run: | | ||
| moon info --target all | ||
| git diff --exit-code | ||
|
|
||
| - name: format diff | ||
| run: | | ||
| moon fmt | ||
| git diff --exit-code | ||
|
|
||
| - name: moon test | ||
| run: | | ||
| moon test --target all |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,3 @@ | ||
| target/ | ||
| .mooncakes/ | ||
| .mooncakes/ | ||
| _build/ |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| # Dependency Error Report | ||
|
|
||
| ## Dependency | ||
|
|
||
| `peter-jerry-ye/io@0.3.4` | ||
|
|
||
| ## Command | ||
|
|
||
| ```bash | ||
| moon check | ||
| ``` | ||
|
|
||
| ## Error | ||
|
|
||
| `moon check` fails while calculating the build plan: | ||
|
|
||
| ```text | ||
| Error: Failed to calculate build plan | ||
|
|
||
| Caused by: | ||
| 0: Failed to solve package relationship | ||
| 1: Import tonyfettes/encoding@0.3.7 exists in global environment, | ||
| but its containing module is not imported by peter-jerry-ye/io@0.3.4, thus cannot be imported by its package 'http' | ||
| ``` | ||
|
|
||
| ## Attempted Fix | ||
|
|
||
| Ran: | ||
|
|
||
| ```bash | ||
| moon add peter-jerry-ye/io | ||
| ``` | ||
|
|
||
| The command completed, but did not update `moon.mod.json` or any other tracked repository file. Running `moon check` afterwards produced the same dependency resolution error. | ||
|
|
||
| ## Conclusion | ||
|
|
||
| The failure comes from `peter-jerry-ye/io@0.3.4`: its `http` package imports `tonyfettes/encoding@0.3.7`, but that containing module is not declared by `peter-jerry-ye/io@0.3.4`. This needs to be fixed in the dependency or by moving this repository to a dependency version where that relationship is declared correctly. |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,8 @@ | ||
| { | ||
| "name": "moonbit-community/cli-template", | ||
| "deps": { | ||
| "peter-jerry-ye/wasi-imports": "0.1.3", | ||
| "peter-jerry-ye/io": "0.3.4", | ||
| "peter-jerry-ye/async": "0.2.0" | ||
| "peter-jerry-ye/wasi-imports": "0.1.5" | ||
| }, | ||
| "source": "src" | ||
| } | ||
| "source": "src", | ||
| "preferred-target": "wasm" | ||
| } |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| import { | ||
| "peter-jerry-ye/wasi-imports/ffi" @ffi, | ||
| "peter-jerry-ye/wasi-imports/interface/wasi/cli/stdout" @stdout, | ||
| "peter-jerry-ye/wasi-imports/interface/wasi/io/streams", | ||
| } | ||
|
|
||
| options( | ||
| link: { | ||
| "wasm": { | ||
| "export-memory-name": "memory", | ||
| "exports": [ | ||
| "cabi_realloc:cabi_realloc", | ||
| "wasmExportRun:wasi:cli/run@0.2.0#run", | ||
| ], | ||
| "heap-start-address": 16, | ||
| }, | ||
| }, | ||
| supported_targets: [ "wasm" ], | ||
| ) |
This file was deleted.
Oops, something went wrong.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| // Generated using `moon info`, DON'T EDIT IT | ||
| package "moonbit-community/cli-template" | ||
|
|
||
| // Values | ||
| pub fn cabi_realloc(Int, Int, Int, Int) -> Int | ||
|
|
||
| pub fn run() -> Result[Unit, Unit] | ||
|
|
||
| pub fn wasmExportRun() -> Int | ||
|
|
||
| // Errors | ||
|
|
||
| // Types and methods | ||
|
|
||
| // Type aliases | ||
|
|
||
| // Traits | ||
|
|
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,22 +1,19 @@ | ||
| ///| | ||
| /// Run the program. | ||
| pub fn run() -> Result[Unit, Unit] { | ||
| let mut result = Ok(()) | ||
| @promise.spawn(async fn() { | ||
| top() catch { | ||
| error => { | ||
| result = Err(()) | ||
| @io.println_sync("Error \{error}", stream=@io.stderr) | ||
| } | ||
| } | ||
| }) | ||
| |> ignore | ||
| @io.event_loop.run() | ||
| result | ||
| top() | ||
| } | ||
|
|
||
| ///| | ||
| /// User should change this function to do what they want | ||
| async fn top() -> Unit { | ||
| @io.println("Hello, world!") | ||
| fn top() -> Result[Unit, Unit] { | ||
| let stdout = @stdout.get_stdout() | ||
| let result = stdout.blocking_write_and_flush( | ||
| b"Hello, world!\n".to_fixedarray(), | ||
| ) | ||
| stdout.drop() | ||
| match result { | ||
| Ok(_) => Ok(()) | ||
| Err(_) => Err(()) | ||
| } | ||
| } | ||
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
run()now returnstop()directly, which removes the previouscatchboundary that translated unexpected runtime errors intoErr(()). If a user-modifiedtopraises (or otherwise traps) instead of returningErr, the exportedwasi:cli/runpath will abort the component rather than returning an error status, changing failure behavior for hosts that expect a normal result-based exit.Useful? React with 👍 / 👎.