Skip to content

build: add VS Code DevContainer support for seamless onboarding#9818

Open
Divinesoumyadip wants to merge 1 commit intoThe-OpenROAD-Project:masterfrom
Divinesoumyadip:devcontainer-support
Open

build: add VS Code DevContainer support for seamless onboarding#9818
Divinesoumyadip wants to merge 1 commit intoThe-OpenROAD-Project:masterfrom
Divinesoumyadip:devcontainer-support

Conversation

@Divinesoumyadip
Copy link
Contributor

Currently, developers using Docker must manually run container build commands, configure volume mounts, and manually attach their IDEs to the container environment. This creates friction and a steep learning curve for first-time contributors.

By adding native DevContainer support, users can now simply open the cloned repository in VS Code and click "Reopen in Container".

This configuration automatically:

  1. Builds against the dev target in our existing Dockerfile (leveraging the optimized base image).
  2. Sets up the correct workspace mounting automatically.
  3. Pre-installs essential VS Code extensions for OpenROAD development (cpptools, cmake-tools, etc.).
  4. Drops the user into a ready-to-use root bash terminal.

@github-actions
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces DevContainer support, which is a valuable addition for streamlining the developer onboarding process. My review focuses on refining the configuration for robustness and maintainability. I've suggested simplifying the VS Code extensions list by removing redundant entries and correcting the postCreateCommand to prevent potential container lifecycle issues. These changes will help ensure a smooth experience for developers using the new DevContainer environment.

}
},
"remoteUser": "root",
"postCreateCommand": "echo 'Welcome to the OpenROAD DevContainer! Run ./etc/Build.sh to get started.' && bash"
Copy link
Contributor

Choose a reason for hiding this comment

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

high

The && bash at the end of postCreateCommand will cause the container setup process to hang, as it waits for the non-interactive bash session to terminate. This can prevent VS Code from attaching correctly. VS Code automatically provides a terminal, so launching one here is unnecessary and problematic.

    "postCreateCommand": "echo 'Welcome to the OpenROAD DevContainer! Run ./etc/Build.sh to get started.'"

Comment on lines +13 to +18
"extensions": [
"ms-vscode.cpptools",
"ms-vscode.cpptools-extension-pack",
"ms-vscode.cmake-tools",
"twxs.cmake"
]
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

The ms-vscode.cpptools-extension-pack extension pack already includes both ms-vscode.cpptools and ms-vscode.cmake-tools. Including them explicitly is redundant and can be removed to simplify the configuration.

            "extensions": [
                "ms-vscode.cpptools-extension-pack",
                "twxs.cmake"
            ]

…boarding

Signed-off-by: Divinesoumyadip <soumyacode7@gmail.com>
@github-actions
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

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.

1 participant