Skip to content

Conversation

tobiasdiez
Copy link
Contributor

... otherwise different devcontainers would try to reuse the same venv/build directory - which will not work as the underlying os of the devcontainer can be quite different.

📝 Checklist

  • The title is concise and informative.
  • The description explains in detail what this PR is about.
  • I have linked a relevant issue or discussion.
  • I have created tests covering the changes.
  • I have updated the documentation and checked the documentation preview.

⌛ Dependencies

... otherwise different devcontainers would try to reuse the same venv/build directory - which will not work as the underlying os of the devcontainer can be quite different.
@dimpase
Copy link
Member

dimpase commented Sep 14, 2025

please more background in the PR's description. What is a devcontainer?

Copy link

github-actions bot commented Sep 14, 2025

Documentation preview for this PR (built with commit 90f6c93; changes) is ready! 🎉
This preview will update shortly after each push to this PR.

@tobiasdiez
Copy link
Contributor Author

tobiasdiez commented Sep 14, 2025

please more background in the PR's description. What is a devcontainer?

A devcontainer allows you to open the sagemath source in a different docker container and then use that as your dev env (more details at https://code.visualstudio.com/docs/devcontainers/containers). I use it to test the meson setup on different linux distros. It's also used for the github codespaces.

Since, with devcontainers, you can open the same sagemath source in different os, their virtual env and build folders need to be distinguished - otherwise your archlinux devcontainer is trying to reuse build artifacts from ubuntu.

With the changes here, everything is tied to an id that is unique for the particular config.

@dimpase
Copy link
Member

dimpase commented Sep 14, 2025

I know that one can review PRs in codespace.
How does one control which OS it is using?
Is it possible?

@tobiasdiez
Copy link
Contributor Author

tobiasdiez commented Sep 14, 2025

image

Then under "New with options" you can select the container.

@dimpase
Copy link
Member

dimpase commented Sep 16, 2025

OK - in which scenarios one can have different devcontainers in one SAGEROOT? This would need some kind of overlay filesystem? (perhaps it's how Docker works, I just don't know)

@tobiasdiez
Copy link
Contributor Author

OK - in which scenarios one can have different devcontainers in one SAGEROOT? This would need some kind of overlay filesystem? (perhaps it's how Docker works, I just don't know)

Not with the codespaces on github, of course. But there is a "Devcontainer" extension in vs code that allows you to reopen an arbitrary folder in a given devcontainer. So in particular you can have SAGEROOT open in multiple devcontainers at the same time, all with the same shared code.

@tobiasdiez
Copy link
Contributor Author

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants