-
Notifications
You must be signed in to change notification settings - Fork 32
Add Dev Container configuration #90
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
Open
tierra
wants to merge
1
commit into
wxWidgets:main
Choose a base branch
from
tierra:master
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// For format details, see https://aka.ms/devcontainer.json. For config options, see the | ||
// README at: https://github.com/devcontainers/templates/tree/main/src/jekyll | ||
{ | ||
"name": "Jekyll", | ||
"image": "mcr.microsoft.com/devcontainers/jekyll:2-bookworm", | ||
"features": { | ||
"ghcr.io/devcontainers/features/node:1": {} | ||
}, | ||
"forwardPorts": [4000], | ||
"containerEnv": { | ||
"WX_SITE_DIR": "${containerWorkspaceFolder}" | ||
}, | ||
"postCreateCommand": { | ||
"bootstrap": "./.devcontainer/postCreateCommand.sh", | ||
"assets": "yarn && yarn dist", | ||
"jekyll": "bundle exec jekyll serve" | ||
}, | ||
"customizations": { | ||
"vscode": { | ||
"settings": { | ||
"files.eol": "\n" | ||
}, | ||
"extensions": [ | ||
"shopify.ruby-lsp" | ||
] | ||
} | ||
} | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -ex | ||
|
||
ruby update_release_info.rb | ||
ruby _cron/update_download_stats.rb | ||
|
||
git clone --depth=1 https://github.com/wxWidgets/wxWidgets.git | ||
|
||
_cron/update_wxxrc_schema.sh | ||
_cron/update_translation_stats.sh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
* text=auto eol=lf |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
I would omit this file: we don't have any .cmd/.bat files and I don't like using
text=auto
. So unless we really need it, let's just use the EOLs of the files in the repository which should already be LF.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.
I added this mainly for at least the
* text=auto eol=lf
part, since I ran into issues with git running inside of VS Code codespace terminals running on local Windows converting everything to CRLF for some reason.I think it might have something to do with Dev Container support for inheriting various local environment settings into the container environments, though I'm not sure.
In any case, I want that first line at least to help prevent PRs being created that perform those conversions, even if git is configured incorrectly on the client side.
I'm fine removing the bat/cmd lines though. You're right, I doubt we ever add those to this repo.
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.
I guess it should also fix the issue with just
* eol=lf
alone, withouttext=auto
. I'll try just that.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.
Nope, doesn't work without
text=auto
. This results in changes to binary files.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.
Are they really converting all files by default?? This would seem to be an incredibly stupid thing to do, so I can't quite believe it, but why else would this happen?
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.
I don't think it's explicitly converting them. I just think it's probably checking out files as CRLF due to inheriting some local environment settings from the Windows host into the Dev Container, but then maybe new terminals or some operations don't also get those, and think the file is modified?
I'm not really certain the cause, but I believe adding this ensures that it does check out files as LF on all Windows environments as well, thus avoiding the issue entirely.
I originally found this approach from a VS Code FAQ covering Dev Containers. It seems like this is a common issue that comes up.
Uh oh!
There was an error while loading. Please reload this page.
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.
I have actually struggled with this in the past when using my GitHub Desktop clone of the website repo on Windows for what it's worth, and I imagine this would fix that as well.
How do you normally work on this repo out of curiosity?
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.
I know that this is a common issue but I think it only happens when people enable auto conversion when installing Git, i.e. enable it in the global
gitconfig
. I never do this (and think it's a huge mistake to do it), but if this is indeed the case, then I guess this is the right thing to do.