WasmEdge icon indicating copy to clipboard operation
WasmEdge copied to clipboard

[component model] instantiate

Open dannypsnl opened this issue 1 year ago • 6 comments
trafficstars

#3151

  1. [component model] linear indexed space
    1. instance section
      1. inline export immediate module instance
      2. instantiate module instance via module definition
      3. instantiate component instance via component definition
    2. canonical section
      1. lift: wrap a core module function with component types
      2. lower: wrap a component function with core types
    3. alias definitions
    4. import definitions
    5. export definitions
    6. type section (record into a index space)
  2. [wasi-http] a test component in wasi-http plugin, the demo helps us to interact with canonical ABI
  3. [wasi-poll] standard plugin
  4. [formatter] format component types and AST::FunctionType

dannypsnl avatar Feb 15 '24 08:02 dannypsnl

Hello, I am a code review bot on flows.network. Here are my reviews of code commits in this PR.


juntao avatar Feb 15 '24 08:02 juntao

The tests failing are all wrong instance address.

dannypsnl avatar Mar 14 '24 05:03 dannypsnl

Codecov Report

Attention: Patch coverage is 4.71698% with 909 lines in your changes missing coverage. Please review.

Project coverage is 78.42%. Comparing base (813c200) to head (e7183a4). Report is 1 commits behind head on master.

Files Patch % Lines
lib/executor/instantiate/component/canon.cpp 0.00% 216 Missing :warning:
include/ast/component/type.h 0.00% 171 Missing :warning:
lib/executor/instantiate/component/instance.cpp 0.00% 96 Missing :warning:
include/runtime/instance/component.h 0.00% 80 Missing :warning:
lib/executor/instantiate/component/alias.cpp 0.00% 77 Missing :warning:
lib/executor/instantiate/component.cpp 0.00% 49 Missing :warning:
lib/vm/vm.cpp 45.34% 42 Missing and 5 partials :warning:
lib/executor/instantiate/component/import.cpp 0.00% 30 Missing :warning:
lib/executor/instantiate/component/export.cpp 0.00% 26 Missing :warning:
include/runtime/instance/module.h 0.00% 19 Missing :warning:
... and 11 more
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3218      +/-   ##
==========================================
- Coverage   80.53%   78.42%   -2.11%     
==========================================
  Files         253      262       +9     
  Lines       34916    35873     +957     
  Branches     6143     6474     +331     
==========================================
+ Hits        28119    28133      +14     
- Misses       5367     6308     +941     
- Partials     1430     1432       +2     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Mar 14 '24 06:03 codecov[bot]

The windows failure is irrelevant with this PR.

dannypsnl avatar Mar 14 '24 06:03 dannypsnl

The windows failure is irrelevant with this PR.

Ref: #3257

hydai avatar Mar 14 '24 07:03 hydai

NOTE: cleanup log once demo can totally rely on canonical ABI, which means we at least supports string.

dannypsnl avatar Apr 03 '24 09:04 dannypsnl

Please fix the Windows build.

q82419 avatar May 03 '24 09:05 q82419

I have no idea how would changes fail the Windows tests.

Update 2024/05/15

I check and found the fail is about a test cleanup failed, should not relate to PR changes.

dannypsnl avatar May 06 '24 07:05 dannypsnl

@hydai The bug is fixed, with update branch this should be ready to be merged.

dannypsnl avatar Jun 06 '24 12:06 dannypsnl

@dannypsnl Please rebase to the latest master.

hydai avatar Jun 06 '24 12:06 hydai

@hydai rebased.

dannypsnl avatar Jun 06 '24 14:06 dannypsnl

The Windows CI failed.

hydai avatar Jun 06 '24 21:06 hydai

Yes, file system missing, do we changes something in CI?

dannypsnl avatar Jun 07 '24 07:06 dannypsnl

We don't. Except for the missing filesystem, however, the unit tests also failed (SEGFAULT).

hydai avatar Jun 07 '24 07:06 hydai

That's weird, on our remote Windows tests are passed.

dannypsnl avatar Jun 07 '24 07:06 dannypsnl

That's weird, on our remote Windows tests are passed.

Let me try to bump deps in the workflow.

hydai avatar Jun 07 '24 07:06 hydai

That's weird, on our remote Windows tests are passed.

In our experience, this situation usually occurs when we used an undefined behavior.

q82419 avatar Jun 07 '24 07:06 q82419

The Windows CI on the master branch failed. I need to figure out the reason. https://github.com/WasmEdge/WasmEdge/actions/runs/9413379849/job/25930046709?pr=3455

@q82419 I think we can move forward to merge this and fix the windows CI later.

hydai avatar Jun 07 '24 07:06 hydai

@hydai Rebase are done

dannypsnl avatar Jun 14 '24 07:06 dannypsnl

The prefixes should be in the same style, such as [WASI] and [Misc]. These commits contain multiple styles of the same name, including [Misc] vs. [misc].

hydai avatar Jun 17 '24 14:06 hydai

@hydai updated

dannypsnl avatar Jun 18 '24 05:06 dannypsnl