Skip to content

feat(dart): create Dart feature #23

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

Closed
wants to merge 14 commits into from
Closed

feat(dart): create Dart feature #23

wants to merge 14 commits into from

Conversation

jcbhmr
Copy link
Member

@jcbhmr jcbhmr commented May 30, 2023

There is no "Dart" feature on https://containers.dev/features yet. I would like to add this feature so that the devcontainers-community/templates#31 Dart template can use this Dart feature without needing to install it in a Dockerfile.

This PR would...

I am not familiar with the Dart ecosystem enough to know whether there are any other tools or things that should be installed or options that should be given. For instance, should https://flutter.dev/ be a separate feature that depends on Dart or rolled into the same one? Probably separate, but I'm not in-tune enough to know 100%.

Nevertheless I think that merging this basic Dart feature would be good to get devcontainers-community/templates#31 flying even if #17 is not finished yet.

@jcbhmr jcbhmr added the enhancement New feature or request label May 30, 2023
@jcbhmr jcbhmr added this to the First feature milestone May 30, 2023
@jcbhmr jcbhmr requested a review from eitsupi May 30, 2023 21:31
@jcbhmr jcbhmr self-assigned this May 30, 2023
@jcbhmr jcbhmr marked this pull request as draft May 30, 2023 21:31
@jcbhmr
Copy link
Member Author

jcbhmr commented May 30, 2023

I know https://github.com/jarrodcolburn/features/tree/main/src/flutter-sdk has the Flutter SDK feature listed on https://containers.dev/features but it seems like @jarrodcolburn has archived it. Maybe that would be another good candidate for a feature @eitsupi? We need to formally define guardrails in #17 though.

@jcbhmr jcbhmr marked this pull request as ready for review May 30, 2023 21:59
@jcbhmr jcbhmr linked an issue May 30, 2023 that may be closed by this pull request
6 tasks
Copy link
Contributor

@eitsupi eitsupi left a comment

Choose a reason for hiding this comment

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

I think Dart is worth adding here as it is required for devcontainers-community/templates#31.

Added a few comments that may help with the fix. Also, please add tests.

# "Perform the following one-time setup:"
sudo apt-get update
sudo apt-get install apt-transport-https
wget -qO- https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo gpg --dearmor -o /usr/share/keyrings/dart.gpg
Copy link
Contributor

Choose a reason for hiding this comment

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

Should check wget installed before this line.

Copy link
Member Author

Choose a reason for hiding this comment

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

Does check_packages wget do this, or do I also need the ca-certificates or whatever magic?

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

I tried to stay as close to the official https://dart.dev/get-dart way as I reasonably could (hence my earlier mistake with sudo 🤦‍♂️).

image

I note specifically this part:

# Yarn example
echo "deb [arch=$(dpkg --print-architecture) ..."
# The official https://dart.dev/get-dart
echo 'deb ... arch=amd64]'

Is this significant? Are there other significant differences between https://dart.dev/get-dart and the way it's done in the Node.js yarn thing in the devcontainers/features repo?

Copy link
Contributor

Choose a reason for hiding this comment

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

Is this significant? Are there other significant differences between dart.dev/get-dart and the way it's done in the Node.js yarn thing in the devcontainers/features repo?

This difference is very important and must be emphasized in the documentation because if Dart only supports amd64, the arm64 platform will not be able to use this Feature.

@jcbhmr
Copy link
Member Author

jcbhmr commented May 31, 2023

I am unsure why this is failing 🤔

image

@eitsupi eitsupi mentioned this pull request Jun 6, 2023
Copy link
Contributor

@eitsupi eitsupi left a comment

Choose a reason for hiding this comment

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

Unfortunately, according to the official site, installation via apt is only supported on amd64, so we need to switch to downloading the zip file and installing that.
Could you please change the installation method completely?

https://dart.dev/get-dart/archive

@jcbhmr
Copy link
Member Author

jcbhmr commented Jun 6, 2023

Would it be acceptable to add a big notice and merge this as a minimum working thing? Then do a subsequent PR?

@eitsupi
Copy link
Contributor

eitsupi commented Jun 6, 2023

Would it be acceptable to add a big notice and merge this as a minimum working thing? Then do a subsequent PR?

I believe this PR should be completely rewritten before merging.
Installation via Debian package and installation by zip file are completely different, and there appears to be little value in implementing installation by Debian package.

Since I have a little time, I will take care of this task.

@eitsupi eitsupi self-assigned this Jun 6, 2023
@eitsupi eitsupi marked this pull request as draft June 6, 2023 08:00
@eitsupi
Copy link
Contributor

eitsupi commented Jun 6, 2023

Sorry, I worked on Codespaces on my fork and couldn't push to this branch, so I opened another PR #26.

Closing in favor of #26.

@eitsupi eitsupi closed this Jun 6, 2023
jcbhmr added a commit that referenced this pull request Jun 6, 2023
Continued from #23

---------

Co-authored-by: Jacob Hummer <[email protected]>
@jcbhmr jcbhmr deleted the add-dart-feature branch June 9, 2023 22:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Milestone] First feature
2 participants