Skip to content

Conversation

@lurtz
Copy link
Contributor

@lurtz lurtz commented Jun 17, 2025

This makes it way easier to compile, run and debug code without huge setup efforts.

depends on https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/issues/6389 to publish images via https://github.com/eclipse-score/devcontainer

Is in relation to eclipse-score/score#1256

@lurtz
Copy link
Contributor Author

lurtz commented Jun 25, 2025

Future changes in this PR will make use of what is done in https://github.com/Elektrobit/eclipse-score_devkit/pull/1

@lurtz lurtz force-pushed the add-devcontainer branch from 3aefc54 to a6f9eab Compare June 27, 2025 15:52
@lurtz lurtz mentioned this pull request Jul 4, 2025
7 tasks
Copy link
Contributor

@opajonk opajonk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, only this one thing that needs to be updated after the first devcontainer is built and published.

@lurtz lurtz force-pushed the add-devcontainer branch from 9beea03 to f5cd818 Compare July 10, 2025 11:38
This makes it way easier to compile, run and debug code without huge setup efforts.
@lurtz lurtz force-pushed the add-devcontainer branch from f5cd818 to f7f5ddb Compare July 10, 2025 11:40
@lurtz lurtz marked this pull request as ready for review July 10, 2025 11:41
@MarkSchmitt
Copy link

MarkSchmitt commented Jul 11, 2025

In vscode on mac (apple silicon) it runs into this error during setup:

 *  Executing task: bazel run @rules_rust//tools/rust_analyzer:gen_rust_project 

Extracting Bazel installation...
Starting local Bazel server and connecting to it...
DEBUG: Rule 'rules_boost~' indicated that a canonical reproducible form can be obtained by modifying arguments integrity = "sha256-aSViuHoOdF32Ue/Cx02/mOzyEebHMFuifjZs4GNWjsE="
DEBUG: Repository rules_boost~ instantiated at:
  <builtin>: in <toplevel>
Repository rule http_archive defined at:
  /var/cache/bazel/d130cfea8d610fd5cbbe7bb32e05decb/external/bazel_tools/tools/build_defs/repo/http.bzl:387:31: in <toplevel>
WARNING: For repository 'bazel_skylib', the root module requires module version bazel_skylib@1.7.1, but got bazel_skylib@1.8.1 in the resolved dependency graph.
ERROR: no such package '@@score_toolchains_gcc~~gcc~gcc_toolchain_gcc//': error globbing [*/**/*] op=FILES: /var/cache/bazel/d130cfea8d610fd5cbbe7bb32e05decb/external/score_toolchains_gcc~~gcc~gcc_toolchain_gcc/share/licenses/zstd/build (No such file or directory)
ERROR: /var/cache/bazel/d130cfea8d610fd5cbbe7bb32e05decb/external/score_toolchains_gcc~~gcc~gcc_toolchain/BUILD:34:13: no such package '@@score_toolchains_gcc~~gcc~gcc_toolchain_gcc//': error globbing [*/**/*] op=FILES: /var/cache/bazel/d130cfea8d610fd5cbbe7bb32e05decb/external/score_toolchains_gcc~~gcc~gcc_toolchain_gcc/share/licenses/zstd/build (No such file or directory) and referenced by '@@score_toolchains_gcc~~gcc~gcc_toolchain//:cc_toolchain'
ERROR: Analysis of target '@@rules_rust~//tools/rust_analyzer:gen_rust_project' failed; build aborted: Analysis failed
INFO: Elapsed time: 51.767s, Critical Path: 0.06s
INFO: 1 process: 1 internal.
ERROR: Build did NOT complete successfully
ERROR: Build failed. Not running target
FAILED: 
    Fetching repository @@rules_rust~~rust~rust_linux_x86_64__x86_64-unknown-linux-gnu__stable_tools; starting 18s
    Fetching repository @@rules_rust~~rust~rust_analyzer_1.86.0_tools; starting 18s
    Fetching ...l/rules_rust~~rust~rust_linux_x86_64__x86_64-unknown-linux-gnu__stable_tools; Extracting rustc-1.86.0-x86_64-unknown-linux-gnu.tar.xz 10s
    Fetching ...8d610fd5cbbe7bb32e05decb/external/rules_rust~~rust~rust_analyzer_1.86.0_tools; Extracting rustc-1.86.0-x86_64-unknown-linux-gnu.tar.xz 8s

 *  The terminal process "bazel 'run', '@rules_rust//tools/rust_analyzer:gen_rust_project'" terminated with exit code: 1. 
 *  Terminal will be reused by tasks, press any key to close it. 

It is executed as x86_64 container (emulated in docker in a virtual machine):

vscode ➜ /workspaces/communication (main) $ uname -a
Linux c447c8b3f6d5 6.10.14-linuxkit #1 SMP Sat May 17 08:28:57 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux

Running natively on x86_64 linux it seems to work, however not with vscode remote via ssh and then using the devcontainer... it's weird, because that's a pretty common setup for me. Will try to find out more.

Supplemental: even locally on the x86_64 linux I get weird disconnects (vscode running local devcontainers) - I can't see anything more than that I'm afraid. Please double check the container image. I get disconnected from it after working with it for less than five minutes on native x86_64 linux

@lurtz
Copy link
Contributor Author

lurtz commented Jul 11, 2025

In vscode on mac (apple silicon) it runs into this error during setup:
...
Running natively on x86_64 linux it seems to work, however not with vscode remote via ssh and then using the devcontainer... it's weird, because that's a pretty common setup for me. Will try to find out more.

Here I cannot support. I lack the hardware and OS.

Supplemental: even locally on the x86_64 linux I get weird disconnects (vscode running local devcontainers) - I can't see anything more than that I'm afraid. Please double check the container image. I get disconnected from it after working with it for less than five minutes on native x86_64 linux

That is really odd. I executed the devcontainer on the following OS's without the issue you observed:

In both cases I was able to compile and test the code. On both notebooks VS Code is still running with the container and all I did was pressing the reopen in container button.

In both cases I am using a very simple setup. What did you do differently than what I did?

@MarkSchmitt
Copy link

In both cases I was able to compile and test the code. On both notebooks VS Code is still running with the container and all I did was pressing the reopen in container button.

In both cases I am using a very simple setup. What did you do differently than what I did?

I probably went a bit crazy on my linux setup and super-customized it, looks like I broke vscode's ability to use docker devcontainers completly, this was just the first one where that occurred...

On a standard ubuntu 22.04 it works fine, also via ssh + devcontainers.

The applie-silicon issue still bothers me, but having a container that works for linux is definitely a step forward we should take rather than figure out every little niche problem.

MarkSchmitt
MarkSchmitt previously approved these changes Jul 16, 2025
Copy link

@MarkSchmitt MarkSchmitt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, tested with an ubuntu 22.04 host. I did have some weird issues on a apple silicon mac .. but I think we should still go ahead and tackle that later.

Copy link
Contributor

@opajonk opajonk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

latest is good for the start. When we have some tagged containers and "the dust has settled" we should switch to versioned releases, though.

@vinodreddy-g
Copy link

Lgtm - tried it on ubuntu.

vinodreddy-g
vinodreddy-g previously approved these changes Jul 21, 2025
@opajonk
Copy link
Contributor

opajonk commented Jul 23, 2025

I believe #31 will fix the CI/CD failure we see also in this PR.

@lurtz
Copy link
Contributor Author

lurtz commented Jul 23, 2025

I believe #31 will fix the CI/CD failure we see also in this PR.

Nice someone else fixed my issues

Co-authored-by: Oliver Pajonk <oliver@pjnk.de>
Signed-off-by: lurtz <727209+lurtz@users.noreply.github.com>
@lurtz lurtz dismissed stale reviews from vinodreddy-g and MarkSchmitt via dfa5fce July 23, 2025 08:36
@LittleHuba LittleHuba merged commit bd8a695 into eclipse-score:main Jul 23, 2025
1 check passed
@lurtz lurtz deleted the add-devcontainer branch July 23, 2025 15:42
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.

5 participants