GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — Unify docker devcontainer with dockerfile used for CI by BloodStainedCrow · Pull Request #1587 · InfiniTimeOrg/InfiniTime Conversation
Contributor
As discussed in #1497 this removes the need for duplicate Dockerfiles for Docker compilation and .devcontainer development. This will reduce variance in compiler environments and make maintenance easier.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think it would be nice to remove the
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactionsUh oh!
There was an error while loading. Please reload this page. Uh oh!
There was an error while loading. Please reload this page.
Contributor
Author
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
BloodStainedCrow
marked this pull request as ready for review
Member
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Contributor
Author
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Contributor
Author
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
|
There was an error while loading. Please reload this page.
|
Which linter are you using? clang-format should add trailing newlines, or at the very least not remove them. We mostly stick to having trailing newlines, and I think that almost all files already have them. (Keep in mind that clang-format is only for C/C++ files) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Well, I am using the standard linter integrated into the devcontainer. The linter automatically removes trailing endlines at the end of .json files. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Build size and comparison to main:
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
The currently active maintainers don't use the devcontainer, so you'll need to explain what these changes do.
Please read the commit conventions https://github.com/InfiniTimeOrg/InfiniTime/blob/develop/doc/contribute.md#commit-conventions
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Question: what exactly is the correct compiler we are using? I need to specify the compiler "executable" for Intellisense |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
It's the one specified in the build instructions. https://github.com/InfiniTimeOrg/InfiniTime/blob/develop/doc/buildAndProgram.md |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
This pull request should be ready to merge now |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Sorry it's taken so long to get around to reviewing this. I think that most of it is pretty good. I think it should be possible to get the executable paths etc. from build.sh by exporting them to the environment.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Why are the checks failing? The logs imply a check called |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
This check depends on another check, but they can't be run because there are conflicts. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I have looked into extracting the compilerPath from If anyone knows if there is way to set VSCode extension settings based on exported variables in a .sh script that would be ideal, I did not find a way. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
While it's not perfect, mostly due to the copying of variables, this fixes the devcontainer and improves its maintainability.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Uh oh, I see the PR now has 176 changed files, did I mess up the merge...? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
7cbc2a8 to
647b77e
Compare
|
@BloodStainedCrow I've just fixed that merge commit, so now I believe this pull request is in a good enough state to be squash merged. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Thanks for reducing redundancy. But the current version with hard coded paths breaks existing setups. Which isn't desirable
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
58715cc to
0a0a4c3
Compare
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
small open questions from my side. Everything else looking sound. I don't use the Dockerfile or the devcontainer, so I didn't check functionality.
Would love for someone else to chime in and do a review as well
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
| // FIXME: This is hardcoded. I have no idea how to use the values set in build.sh here | ||
| "gdbPath": "/opt/gcc-arm-none-eabi-10.3-2021.10/bin/arm-none-eabi-gdb", |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
can the "GCC_ARM_PATH" variable be used here?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
As far as I know (see my previous attempts above) VSCode currently does not support loading variables for launch.json from anything but launch.json itself, which sadly means without some serious hacks, there will be this reference here, which might become outdated.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Looking at this though, the very least I should do is unify the occurrences of it in a variable in launch.json so only one value can grow stale
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
that would be very welcome, as it would minimize the staleness factor (if that is a word 😁 )
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I was mistaken, it seems is not possible to share variables (outside a .env file, but that would be out of scope for this PR IMO) between mutiple launch.json configurations.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Additionally I currently have no way to test the other configuration on, whether they even still work in their current state, from what I can tell, at least one of them is around 3 years out of date...
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Not a different compiler? We just need one (the currently officially supported one)
Or what configurations are you talking about. If they are deprecated the maybe we can remove those?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
In launch.json there are different launch configurations usable via a button in VSCode. These are what I meant.
While I am open to removing them/replacing them with ones that actually work, I would probably like some more input from people who might use them, so maybe in another PR...
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the clarification. I agree. Let's merge this!
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I tried using the devcontainer again, and found a couple snags:
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Additionally there does not seem to be any source mapping for debugging, I will have to look into that aswell |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Okay, I have now found the correct setting to add source/symbol maps to gdb for debugging. As far as I can tell: |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Indeed. The line endings however is due to git using the local encoding when you check out the repo (ie, in windows, so it gives them CR/LFs) but then when that repo is accessed inside the container all the tools expect unix textfiles. So the actual repo doesn't contain any CR/LF files, they get converted to that when you check them out under windows. We hit this when I was first trying to tackle the whole devcontainers thing. I think this comment provided the best general solution:
Ie, if you do the initial checkout in windows with |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Yikes, thanks windows indeed |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@BloodStainedCrow could you recheck your open points with a |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Both the failed container build and the failed compile are solved with this. The only remaining problem I encountered is the missing source map/ symbol file for debugging. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Thanks for keep on going, improving and keeping this PR up to date!
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
No problem, one question before I agree this can be merged:
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
I don't sorry. Let's fix that in a separate PR 😁 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
…1587) * Only use one Dockerfile and build.sh script for both docker and devcontainer * Remove all now unneccessary tasks and scripts * Update to clang-format-14 * Move devcontainer.json into root folder * Fix conditional statements in Dockerfile * Move .devcontainer/README into doc/usingDevcontainers * Remove obsolete VSCode Task * Change standard compiler path to the correct compiler * Set GDB Path for debugging * Hide broken buttons from CMake Extension * Refactor .devcontainer * Remove unneccessary postBuildCommand * Add devcontainer dependencies to all docker images * Add Devcontainer Debug launch config * Add an additional c_cpp_properties config as a fallback for devcontainer * Remove obsolete Docker Argument * Fix wrong C/Cpp versions * Fix silent fail of gdb, add libncurses5
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.