Skip to content

Conversation

@SergioGasquez
Copy link
Member

Add support for VsCode devcontainers

Closes #58

SergioGasquez and others added 3 commits April 20, 2022 15:04
This change sets a fixed commit revision to the `riscv` patch annotation
in all `Cargo.toml` files.

Using `master` as a `branch` option results in different commit hashes at different times, depending on changes in the `riscv` crate. This crate has seen some changes in the last days / weeks that broke the current setup, therefore a working revision is set.
RUN $HOME/.cargo/bin/cargo install cargo-espflash --version 1.4.1
ENV ESP_IDF_TOOLS_INSTALL_DIR=global
ENV ESP_BOARD=esp32c3
ENV ESP_IDF_VER=v4.4
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you check if this environment variable ESP_IDF_VER is required? I could not find a reference in both these repositories espressif/esp-idf & esp-rs/esp-idf-sys. In case it is used, could you add a comment why the env var is set?

ENV ESP_BOARD=esp32c3
ENV ESP_IDF_VER=v4.4
ENV ESP_IDF_VERSION=release/v4.4
ENV ESP_IDF_BRANCH=release/v4.4
Copy link
Contributor

Choose a reason for hiding this comment

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

Is the environment variable ESP_IDF_BRANCH used other than as an argument to git clone in line 27? Maybe we can pass ESP_IDF_VERSION as an argument instead?

ARG NIGHTLY_VERSION=nightly-2022-03-10
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- \
--default-toolchain ${NIGHTLY_VERSION} -y
ENV PATH=${PATH}:$HOME/.cargo/bin:$HOME/.cargo/bin
Copy link
Contributor

Choose a reason for hiding this comment

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

The path $HOME/.cargo/bin is given twice.

@justahero
Copy link
Contributor

justahero commented May 2, 2022

Thanks for the devcontainer, I was able to built the image successfully and was able compile all Rust projects with it. 👍

I left a few small nitpicky comments on the Dockerfile otherwise looks good.

@SergioGasquez
Copy link
Member Author

Thanks for the feedback and great catches! Let me know if you see something else that I can improve!

Copy link
Contributor

@justahero justahero left a comment

Choose a reason for hiding this comment

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

Image was built by VS Code remote extension successfully.

LGTM

@justahero justahero merged commit 930b78c into esp-rs:main May 5, 2022
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.

Add support for VsCode devcontainers

2 participants