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

carbon-now-cli: use buildNpmPackage #249877

Merged
merged 1 commit into from
Aug 23, 2023

Conversation

dotlambda
Copy link
Member

Description of changes

See #229475

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 23.11 Release Notes (or backporting 23.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

cc @rmcgibbo who originally packaged it in #139151

@teto
Copy link
Member

teto commented Aug 18, 2023

Result of nixpkgs-review pr 249877 run on x86_64-linux 1

1 package failed to build:
  • carbon-now-cli

@dotlambda
Copy link
Member Author

It's weird that it built without this error for me but now I also get the same error:

> if [ -d 'dist' ]; then trash dist; fi && tsc && trash dist/coverage && trash dist/test

Error: EACCES: permission denied, mkdir '/.Trash-1000'

@dotlambda dotlambda force-pushed the carbon-now-cli-buildNpmPackage branch from 4a7e124 to fc29755 Compare August 18, 2023 11:06
@teto
Copy link
Member

teto commented Aug 18, 2023

this build but looks like it depends on playwright and usually they require a specific version of the driver https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/web/playwright/driver.nix
I had started something to make it easier to override the browser version #249738 .

(ins)❌1 ❯ carbon-now  ~/config.cfg
(node:797994) ExperimentalWarning: Import assertions are not a stable feature of the JavaScript language. Avoid relying on their current behavior and syntax as those might change in a future version of Node.js.
(Use `node --trace-warnings ...` to show where the warning was created)
(node:797994) ExperimentalWarning: Importing JSON modules is an experimental feature and might change at any time

  Warning: Preset `latest-preset` doesn’t exist. Using default settings…
✔ Processing /home/teto/config.cfg
✔ Preparing connection
↓ Opening in browser
✖ browserType.launch: Executable doesn't exist at /home/teto/.cache/ms-playwright/chromium-1060/chrome-linux/chrome
  ╔═════════════════════════════════════════════════════════════════════════╗
  ║ Looks like Playwright Test or Playwright was just installed or updated. ║
  ║ Please run the following command to download new browsers:              ║
  ║                                                                         ║
  ║     npx playwright install                                              ║
  ║                                                                         ║
  ║ <3 Playwright Team                                                      ║
  ╚═════════════════════════════════════════════════════════════════════════╝
◼ Copying image to clipboard

  Error: Sending code to https://carbon.now.sh went wrong.

  This is mostly due to:

  · Nonsensical input like `--start 10 --end 2`
  · Carbon being down or taking too long to respond
  · Your internet connection not working or being too slow

  Additional info:

  browserType.launch: Executable doesn't exist at /home/teto/.cache/ms-playwright/chromium-1060/chrome-linux/chrome
╔═════════════════════════════════════════════════════════════════════════╗
║ Looks like Playwright Test or Playwright was just installed or updated. ║
║ Please run the following command to download new browsers:              ║
║                                                                         ║
║     npx playwright install                                              ║
║                                                                         ║
║ <3 Playwright Team                                                      ║
╚═════════════════════════════════════════════════════════════════════════╝

Fixing this might be too hard if you just want to convert to buildNpmPackage so we could merge as is and let the maintainer wrap the correct browser version ?

@dotlambda
Copy link
Member Author

dotlambda commented Aug 18, 2023

I tried using PLAYWRIGHT_BROWSERS_PATH=${playwright-driver.browsers} but then it tries to use Chrome which playwright-driver.browsers doesn't come with so it still fails.

@dotlambda dotlambda force-pushed the carbon-now-cli-buildNpmPackage branch 4 times, most recently from 122f852 to 7fbf5ea Compare August 23, 2023 02:03
@dotlambda
Copy link
Member Author

I'll merge this because the current nodePackages.carbon-now-cli doesn't even build.

@dotlambda dotlambda force-pushed the carbon-now-cli-buildNpmPackage branch from 7fbf5ea to 14b9cf8 Compare August 23, 2023 02:05
@dotlambda dotlambda merged commit 69b4dbd into NixOS:master Aug 23, 2023
3 checks passed
@dotlambda dotlambda deleted the carbon-now-cli-buildNpmPackage branch August 23, 2023 02:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Re-packaged
Development

Successfully merging this pull request may close these issues.

2 participants