-
Notifications
You must be signed in to change notification settings - Fork 526
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
Solang playground milestone 4 #1215
base: master
Are you sure you want to change the base?
Solang playground milestone 4 #1215
Conversation
Signed-off-by: salaheldinsoliman <[email protected]>
Signed-off-by: salaheldinsoliman <[email protected]>
@salaheldinsoliman sry for the delay here, will give feedback by tomorrow EOD. |
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.
@salaheldinsoliman sorry for the delay here. I've finished the first iteration of the review, I had some problems with running the tests and the docker infra. For more details see my evaluation.
Additional info
Tested on: Macbook Pro, 2023, M2
Signed-off-by: salaheldinsoliman <[email protected]>
@takahser thanks! Please let me know of there are any other issues |
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.
@salaheldinsoliman how do I install sysbox-runc
? Could you add this directly to your instructions as well?
% docker run \
--runtime=sysbox-runc \
--name playground \
--detach \
--volume /tmp:/tmp \
--publish 9000:9000 \
solang-playground
docker: Error response from daemon: unknown or invalid runtime name: sysbox-runc.
See 'docker run --help'.
@takahser Hello, |
@takahser Hello, |
@salaheldinsoliman sorry for the delay here, it turns out I'll need a linux machine to install Regarding the tests, they still fail: % cargo make test
warning: `/Users/xxx/repos/solang-playground/.cargo/config` is deprecated in favor of `config.toml`
note: if you need to support cargo 1.38 or earlier, you can symlink `config` to `config.toml`
[cargo-make] INFO - cargo make 0.37.23
[cargo-make] INFO -
[cargo-make] INFO - Build File: Makefile.toml
[cargo-make] INFO - Task: test
[cargo-make] INFO - Profile: development
[cargo-make] INFO - Running Task: test-backend
warning: `/Users/xxx/repos/solang-playground/.cargo/config` is deprecated in favor of `config.toml`
note: if you need to support cargo 1.38 or earlier, you can symlink `config` to `config.toml`
Finished `test` profile [unoptimized + debuginfo] target(s) in 0.25s
Running unittests src/lib.rs (target/debug/deps/demo_lsp_browser-416d6ecd276daaa2)
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Running tests/server_tests.rs (target/debug/deps/server_tests-a36a964e00636c53)
running 1 test
test tests::language_server_workflow ... ok
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.02s
Doc-tests demo-lsp-browser
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
[cargo-make] INFO - Running Task: test-app
> [email protected] test
> jest
FAIL tests/api.test.ts
Ensuring the server serves the built frontend
✕ Verifying a successful response upon making a request (52 ms)
Ensuring the server’s compile endpoint is operational
✕ Verifying a successful compile request (3 ms)
● Ensuring the server serves the built frontend › Verifying a successful response upon making a request
expect(received).resolves.toHaveProperty()
Received promise rejected instead of resolved
Rejected to value: [AggregateError]
9 | describe('Ensuring the server serves the built frontend', () => {
10 | test('Verifying a successful response upon making a request', async () => {
> 11 | await expect(axios.get(`${BACKEND_URL}/`)).resolves.toHaveProperty('status', 200);
| ^
12 | });
13 | });
14 |
at expect (../../node_modules/expect/build/index.js:113:15)
at Object.<anonymous> (tests/api.test.ts:11:11)
● Ensuring the server’s compile endpoint is operational › Verifying a successful compile request
expect(received).resolves.toMatchObject()
Received promise rejected instead of resolved
Rejected to value: [AggregateError]
19 | .toString();
20 |
> 21 | await expect(
| ^
22 | axios.post(`${BACKEND_URL}/compile`, {
23 | source,
24 | })
at expect (../../node_modules/expect/build/index.js:113:15)
at Object.<anonymous> (tests/api.test.ts:21:11)
Test Suites: 1 failed, 1 total
Tests: 2 failed, 2 total
Snapshots: 0 total
Time: 1.657 s
Ran all test suites.
npm ERR! Lifecycle script `test` failed with error:
npm ERR! Error: command failed
npm ERR! in workspace: [email protected]
npm ERR! at location: /Users/xxx/repos/solang-playground/packages/app
Error while executing command, exit code: 1 Do you have any idea why that is? |
@salaheldinsoliman I was finally able to run it on a linux (ubuntu) machine. Unfortunately, the tests are failing here as well: $ cargo make test
warning: `/home/ubuntu/solang-playground/.cargo/config` is deprecated in favor of `config.toml`
note: if you need to support cargo 1.38 or earlier, you can symlink `config` to `config.toml`
[cargo-make] INFO - cargo make 0.37.23
[cargo-make] INFO -
[cargo-make] INFO - Build File: Makefile.toml
[cargo-make] INFO - Task: test
[cargo-make] INFO - Profile: development
[cargo-make] INFO - Running Task: test-backend
warning: `/home/ubuntu/solang-playground/.cargo/config` is deprecated in favor of `config.toml`
note: if you need to support cargo 1.38 or earlier, you can symlink `config` to `config.toml`
warning: unexpected `cfg` condition value: `wasm_opt`
--> crates/solang/src/codegen/mod.rs:46:7
|
46 | #[cfg(feature = "wasm_opt")]
| ^^^^^^^^^^^^^^^^^^^^
|
= note: expected values for `feature` are: `contract-build`, `default`, `language_server`, `libc`, and `rust-lapper`
= help: consider adding `wasm_opt` as a feature in `Cargo.toml`
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration
= note: `#[warn(unexpected_cfgs)]` on by default
warning: unexpected `cfg` condition value: `llvm`
--> crates/solang/src/codegen/mod.rs:72:7
|
72 | #[cfg(feature = "llvm")]
| ^^^^^^^^^^^^^^^^
|
= note: expected values for `feature` are: `contract-build`, `default`, `language_server`, `libc`, and `rust-lapper`
= help: consider adding `llvm` as a feature in `Cargo.toml`
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration
warning: unexpected `cfg` condition value: `llvm`
--> crates/solang/src/codegen/mod.rs:84:7
|
84 | #[cfg(feature = "llvm")]
| ^^^^^^^^^^^^^^^^
|
= note: expected values for `feature` are: `contract-build`, `default`, `language_server`, `libc`, and `rust-lapper`
= help: consider adding `llvm` as a feature in `Cargo.toml`
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration
warning: unexpected `cfg` condition value: `wasm_opt`
--> crates/solang/src/codegen/mod.rs:108:11
|
108 | #[cfg(feature = "wasm_opt")]
| ^^^^^^^^^^^^^^^^^^^^
|
= note: expected values for `feature` are: `contract-build`, `default`, `language_server`, `libc`, and `rust-lapper`
= help: consider adding `wasm_opt` as a feature in `Cargo.toml`
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration
warning: unexpected `cfg` condition value: `wasm_opt`
--> crates/solang/src/codegen/mod.rs:125:19
|
125 | #[cfg(feature = "wasm_opt")]
| ^^^^^^^^^^^^^^^^^^^^
|
= note: expected values for `feature` are: `contract-build`, `default`, `language_server`, `libc`, and `rust-lapper`
= help: consider adding `wasm_opt` as a feature in `Cargo.toml`
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration
warning: elided lifetime has a name
--> crates/solang/src/sema/builtin_structs.rs:243:59
|
243 | pub fn definition<'a>(&'a self, ns: &'a Namespace) -> &StructDecl {
| -- lifetime `'a` declared here ^ this elided lifetime gets resolved as `'a`
|
= note: `#[warn(elided_named_lifetimes)]` on by default
warning: fields `doc` and `ty` are never read
--> crates/solang/src/sema/yul/builtin.rs:10:9
|
6 | pub struct YulBuiltinPrototype {
| ------------------- fields in this struct
...
10 | pub doc: &'static str,
| ^^^
11 | pub ty: YulBuiltInFunction,
| ^^
|
= note: `#[warn(dead_code)]` on by default
warning: for loop over a `&Option`. This is more readably written as an `if let` statement
--> crates/solang/src/codegen/external_functions.rs:159:22
|
159 | for e in exprs {
| ^^^^^
|
= note: `#[warn(for_loops_over_fallibles)]` on by default
help: to check pattern in a loop use `while let`
|
159 | while let Some(e) = exprs {
| ~~~~~~~~~~~~~~~ ~~~
help: consider using `if let` to clear intent
|
159 | if let Some(e) = exprs {
| ~~~~~~~~~~~~ ~~~
warning: `solang` (lib) generated 8 warnings
Compiling demo-lsp-browser v0.0.0 (/home/ubuntu/solang-playground/crates/browser)
error: linking with `cc` failed: exit status: 1
|
= note: LC_ALL="C" PATH="/home/ubuntu/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-......,relro,-z,now" "-nodefaultlibs"
= note: collect2: fatal error: ld terminated with signal 9 [Killed]
compilation terminated.
error: could not compile `demo-lsp-browser` (test "server_tests") due to 1 previous error
Error while executing command, exit code: 101 Any idea, why this happens? In addition to that, docker still fails - even after installing ubuntu@ip-172-31-32-82:~/solang-playground$ sudo systemctl status sysbox -n20
● sysbox.service - Sysbox container runtime
Loaded: loaded (/usr/lib/systemd/system/sysbox.service; enabled; preset: enabled)
Active: active (running) since Thu 2024-12-19 16:39:36 UTC; 1min 13s ago
Docs: https://github.com/nestybox/sysbox
Main PID: 13969 (sh)
Tasks: 2 (limit: 1130)
Memory: 432.0K (peak: 3.1M)
CPU: 23ms
CGroup: /system.slice/sysbox.service
├─13969 /bin/sh -c "/usr/bin/sysbox-runc --version && /usr/bin/sysbox-mgr --version && /usr/bin/sysbox-fs --versio>
└─13983 /bin/sleep infinity
Dec 19 16:39:36 ip-172-31-32-82 systemd[1]: Started sysbox.service - Sysbox container runtime.
Dec 19 16:39:36 ip-172-31-32-82 sh[13970]: sysbox-runc
Dec 19 16:39:36 ip-172-31-32-82 sh[13970]: edition: Community Edition (CE)
Dec 19 16:39:36 ip-172-31-32-82 sh[13970]: version: 0.6.5
Dec 19 16:39:36 ip-172-31-32-82 sh[13970]: commit: 1b440ff266841f3d2d296e664122a9e29ceb9fd8
Dec 19 16:39:36 ip-172-31-32-82 sh[13970]: built at: Sat Nov 9 06:09:34 UTC 2024
Dec 19 16:39:36 ip-172-31-32-82 sh[13970]: built by: Rodny Molina
Dec 19 16:39:36 ip-172-31-32-82 sh[13970]: oci-specs: 1.1.0+dev
Dec 19 16:39:36 ip-172-31-32-82 sh[13975]: sysbox-mgr
Dec 19 16:39:36 ip-172-31-32-82 sh[13975]: edition: Community Edition (CE)
Dec 19 16:39:36 ip-172-31-32-82 sh[13975]: version: 0.6.5
Dec 19 16:39:36 ip-172-31-32-82 sh[13975]: commit: 1159d228eac8402efa63bd2cb18cdf9e404ea130
Dec 19 16:39:36 ip-172-31-32-82 sh[13975]: built at: Sat Nov 9 06:10:05 UTC 2024
Dec 19 16:39:36 ip-172-31-32-82 sh[13975]: built by: Rodny Molina
Dec 19 16:39:36 ip-172-31-32-82 sh[13979]: sysbox-fs
Dec 19 16:39:36 ip-172-31-32-82 sh[13979]: edition: Community Edition (CE)
Dec 19 16:39:36 ip-172-31-32-82 sh[13979]: version: 0.6.5
Dec 19 16:39:36 ip-172-31-32-82 sh[13979]: commit: aeba775e52cc6385fa4807c594fc7ee164ad624c
Dec 19 16:39:36 ip-172-31-32-82 sh[13979]: built at: Sat Nov 9 06:10:01 UTC 2024
Dec 19 16:39:36 ip-172-31-32-82 sh[13979]: built by: Rodny Molina
ubuntu@ip-172-31-32-82:~/solang-playground$ docker run \
--runtime=sysbox-runc \
--name playground \
--detach \
--volume /tmp:/tmp \
--publish 9000:9000 \
solang-playground
docker: Error response from daemon: unknown or invalid runtime name: sysbox-runc.
See 'docker run --help'.
docker: permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Head "http://%2Fvar%2Frun%2Fdocker.sock/_ping": dial unix /var/run/docker.sock: connect: permission denied.
See 'docker run --help'.
Command 'docker:' not found, did you mean:
command 'docker' from snap docker (27.2.0)
command 'docker' from deb docker.io (24.0.7-0ubuntu4.1)
command 'docker' from deb podman-docker (4.9.3+ds1-1ubuntu0.2)
command 'dockerd' from deb docker.io (24.0.7-0ubuntu4.1)
See 'snap info <snapname>' for additional versions.
Command 'See' not found, did you mean:
command 'ree' from deb ree (1.4.1-2)
command 'pee' from deb moreutils (0.67-1)
command 'see' from deb mailcap (3.70+nmu1ubuntu1)
command 'tee' from deb coreutils (9.4-2ubuntu2)
Try: sudo apt install <deb name> Somehow there seems to be a problem with how docker interacts with sysbox: docker: Error response from daemon: unknown or invalid runtime name: sysbox-runc. |
Hello @takahser For the problem on the ubuntu machine however, the build process gets killed with signal 9, this is most likely a memory error. If you run vbox, you can try allocating more memory for it to work, also don't forget to 2- For the docker problem, you have to add docker to the Please let me know if you encounter other issues |
@salaheldinsoliman thanks for your feedback.
I'm not using Windows :) Maybe it's easier to schedule a call. If you're able to demonstrate the failing deliverables on your machine, I'd be fine accepting them, even if they fail on both my physical MacBook and virtual Ubuntu machine. |
Milestone Delivery Checklist
Link to the application pull request: w3f/Grants-Program#1894