triton-lang / triton

Development repository for the Triton language and compiler
https://triton-lang.org/
MIT License
13.54k stars 1.67k forks source link

feat: Dev Container for consistent dev setup #5143

Open maryamtahhan opened 2 weeks ago

maryamtahhan commented 2 weeks ago

Added a Dev Container configuration to streamline development and onboarding. This setup ensures a consistent, isolated environment with all necessary tools and dependencies for building and running Triton.

Edit: I updated the Dev Container to enable the LLVM build based on a flag in devcontainer.json rather than editing the Dockerfile directly. This should lower the barrier to entry for using containers for new users. Additionally the LLVM build now pulls the commit id from cmake/llvm-hash.txt or the user can edit the COMMIT directly.

New contributor declaration

maryamtahhan commented 1 week ago

Thank you @ThomasRaoux for your feedback. Could you clarify your concern about the dev container potentially becoming outdated quickly?

Also, could you elaborate on why improving the onboarding experience for developers might be considered out of scope?

The purpose of including the dev container in the repository is to provide a consistent development environment across various setups. This consistency benefits both new developers during onboarding and existing contributors. If the dev container is part of the repo, any updates to the project are automatically reflected in the dev container immediately.

ThomasRaoux commented 1 week ago

Thank you @ThomasRaoux for your feedback. Could you clarify your concern about the dev container potentially becoming outdated quickly?

Also, could you elaborate on why improving the onboarding experience for developers might be considered out of scope?

The purpose of including the dev container in the repository is to provide a consistent development environment across various setups. This consistency benefits both new developers during onboarding and existing contributors. If the dev container is part of the repo, any updates to the project are automatically reflected in the dev container immediately.

sorry for the slow response. My concerns is that when something change in the flow those files are not going to be updated and will be staled.

maryamtahhan commented 1 week ago

sorry for the slow response. My concerns is that when something change in the flow those files are not going to be updated and will be staled.

No problem. How frequently does the Triton flow change? The dev container files typically need updates only when there’s a significant change in tooling or dependencies. To address the concern, we can document the purpose and scope of these files in the CONTRIBUTING.md file, explicitly stating when they need to be reviewed (e.g., during changes to dependencies or tooling). Additionally/alternatively, we can include a checklist item in PR templates to remind contributors to verify the dev container files or update them when dependency/tooling changes are made.

To further mitigate concerns, I’d be happy to take responsibility for updating these files if the development environment changes significantly.

Even if these files aren’t updated immediately with every future change, they won’t negatively impact the core application. At worst, they might require minor adjustments later, but their inclusion now ensures a more consistent developer experience..