-
-
Notifications
You must be signed in to change notification settings - Fork 10k
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
Create devcontainer.json #13520
base: main
Are you sure you want to change the base?
Create devcontainer.json #13520
Conversation
Could you please give examples of what benefits this might provide? Which target SDK does this use? How does it help users do runtime testing of the changes they are proposing? If this encourages more users to submit PRs via GitHub's web development tools, could we please hold off until GitHub can work with a rebase workflow? Advising users to squash, reword, or not to spam PRs to update is not productive for anyone, this week's example: #13486 (comment) |
For example, it allows one who has no local dev setup or doesn't want to checkout code locally still participate in the OpenWrt/packages development.
The SDK is generated from this repository: In my test, by default it compiled a package for
Users can download the compiled images/packages from the container locally for the tests.
I don't think this encourages more GitHub's web development tools usage. So I would say this doesn't harm anything, but can be extremely useful. |
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.
LGTM. Unless someone beats me to it, I'll leave it here for next two weeks so it gets a chance for review and then merge this myself.
@ynezz ping please? |
Why do you use the OpenWrt SDK container? I added a codespace container to build OpenWrt using the SDK: https://github.com/hauke/openwrt/blob/codespace/.devcontainer/ci-env/devcontainer.json |
Maintainer: me Compile tested: mips, ath79, OpenWrt SNAPSHOT Description: Development container configuration. The container can run locally or in cloud (Codespaces). Sample usage: easily open full-featured VS Code IDE in browser, pre-configured for OpenWrt firmware/packages development. Signed-off-by: Andrey Butirsky <butirsky@gmail.com>
Can you cross-compile with the default code space environment, out of the box? |
IMO (and if its possible) we should allow both use cases. Any idea how to achieve that? Maybe we should consider ImageBuilder containers in the mix? So we could've codespace for system build, package build with SDK and image builder.
Good point, how to handle this? Is it possible to have some kind of a list for each platform we support? |
@ynezz right now, if we merge both this and #13825, the list of the both container configurations should be presented (but I didn't test it). The same way we could handle all the others platforms, making separate I'm not sure how maintainable that galore of |
Seems to work fine, even with all SDK containers.
We could add script to generate those ynezz@9d22687 |
It probably has no point to generate the .json's for all SDK versions in the master branch. |
It looks like Dev Container Templates provide better answer for this, see "image": "mcr.microsoft.com/devcontainers/java:0-${templateOption:imageVariant}", in the .devcontainer.json example: @ynezz could we have a similar script but to generate The options would be Having that, here is a guide for creating our own custom Dev Container Templates: UPDATE: I also created a relevant issue there: |
having all SDKs available here would be nice. I agree we should only show the master SDKs in master and add the others to the other branches. The template looks very nice. Does the template work with github? The github devcontainer documentation does not mention it. |
Addressing it on OpenWrt docker repo side should guarantee this and I think overall better as there is already all the Tags parsing needed there:
Looks like it does. Worst thing I can imagine the template won't be applied for our repo automagically, and user has to select the OpenWrt SDK Template from a filterable list displayed on the GitHub Codespaces or on the VS Code Dev Containers UI: But that needs to be tested, it might be there is some logic to display most appropriate templates for the repo on the top of the list, or something like that. Anyway, it seems the way to go forward. |
Ping, please |
@hauke ping, please |
Maintainer: me
Compile tested: mips, ath79, OpenWrt SNAPSHOT
Description:
Development container configuration.
The container can run locally or in cloud (Codespaces).
Sample usage: easily open full-featured VS Code IDE in browser, pre-configured for OpenWrt firmware/packages development.
Signed-off-by: Andrey Butirsky butirsky@gmail.com