Skip to content
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

Creating dev container and vscode tasks #449

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

scottfridwin
Copy link

Creating files that help with local development in visual studio code. These do not affect the build at all, but allow for development inside a container with all necessary dependencies.

@scottfridwin
Copy link
Author

Was hoping the automatic docker build would trigger with this PR. I have a hunch that a new build would resolve some current issues being seen simply by pulling a new version of yt-dlp.

@scottfridwin
Copy link
Author

Pretty sure the test failures are related to #448 and not these changes. There isn't anything in here that should affect the tests at all.

},
"postCreateCommand": {
"yarn install": "yarn global add freyr",
"install build tools": "sudo apt-get update && sudo apt install cmake -y"
Copy link
Owner

Choose a reason for hiding this comment

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

Never dealt with devcontainers before, but does it presuppose a debian-based environment? what if apt-get is unavailable?

Copy link
Author

Choose a reason for hiding this comment

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

Yea it is a debian container with some basic dependencies installed. The image details are here:
https://hub.docker.com/_/microsoft-devcontainers-javascript-node?tab=description

Comment on lines 14 to 18
"program": "${workspaceFolder}/cli.js",
"args": [
"spotify:artist:6M2wZ9GZgrQXHCFfjv46we",
"--no-auth"
],
Copy link
Owner

Choose a reason for hiding this comment

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

Let's substitute this for npm test spotify.track or npm test spotify.artist

Copy link
Author

Choose a reason for hiding this comment

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

Sounds good. Replaced the launch configurations with the npm test ... calls.

The console isn't showing the full output for this, which makes debugging a bit trickier. I think there is a launch setting in vscode that will attach it to stdout so I'm gonna try to find that.

Copy link
Author

Choose a reason for hiding this comment

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

Added flag to capture stdout in the vscode debug console.

@scottfridwin
Copy link
Author

If you want to give the dev container a test run, all you should need to do is run the vscode task Dev Containers: Clone Repository in Container Volume... and target this branch url "https://github.com/scottfridwin/freyr-js/tree/cli-reatuh". After that it will set everything up and install dependencies.

Debugging uses the 3 different configurations in 'launch.json' and breakpoints work in the code.

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.

None yet

2 participants