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

Test Cases Running Indefinitely on macOS #349

Open
Sooryasanand opened this issue Dec 18, 2024 · 5 comments
Open

Test Cases Running Indefinitely on macOS #349

Sooryasanand opened this issue Dec 18, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@Sooryasanand
Copy link

Bug Description

When running npm run test inside Polykey on macOS, the test process runs indefinitely and never completes.


Steps to Reproduce

  1. Clone the Polykey-CLI repository to macOS.
  2. Navigate to the Polykey-CLI folder using cd.
  3. Run npm install.
  4. Execute npm run test.

Expected Behavior

The test cases should complete in a reasonable amount of time, providing a clear summary of the test results.


Screenshot

Test Running Indefinitely


Platform Details

  • Device: MacBook Pro 13-inch (M1, 2020)
  • OS: macOS Sequoia
  • Version: 15.1.1

Additional Context

This issue prevents test execution, making it difficult to validate changes.


Notify Maintainers

@aryanjassal
@tegefaulkes

@Sooryasanand Sooryasanand added the bug Something isn't working label Dec 18, 2024
Copy link

linear bot commented Dec 18, 2024

@Sooryasanand
Copy link
Author

I've included the console log output from running npm run test for your reference..
Test Run console log messages.txt

@aryanjassal
Copy link
Member

Soorya and I have been trying to get this resolved. The first thing we tried was to try and use nix package manager, but that didn't work because PKCLI's flake.nix doesn't export a darwin shell. He was able to work around that by updating the flake and packages for darwin, but he ran into an error where he couldn't install a package because there is no defined output for nixpkgs-matrix for darwin.

So, I got him to run the relevant commands from the devshell manually. He got Node v20 LTS using homebrew and ran the command npm install --ignore-scripts to install the packages for his development environment. I confirmed this by checking the version of a few packages and seeing they were the same. This failed with the following error.

Polykey-CLI on  HEAD (e452247) [!] is 📦 v0.16.3 via  v20.18.1 
❯ npm run polykey -- agent start                       

> polykey-cli@0.16.3 polykey
> ts-node src/polykey.ts agent start

/Users/soorya/Developer/Polykey-CLI/node_modules/ts-node/src/transpilers/swc.ts:262
      throw new Error(
            ^
Error: @swc/core threw an error when attempting to validate swc compiler options.
You may be using an old version of swc which does not support the options used by ts-node.
Try upgrading to the latest version of swc.
Error message from swc:
Bindings not found
    at createVariant (/Users/soorya/Developer/Polykey-CLI/node_modules/ts-node/src/transpilers/swc.ts:262:13)
    at createSwcOptions (/Users/soorya/Developer/Polykey-CLI/node_modules/ts-node/src/transpilers/swc.ts:211:25)
    at create (/Users/soorya/Developer/Polykey-CLI/node_modules/ts-node/src/transpilers/swc.ts:56:41)
    at createTranspiler (/Users/soorya/Developer/Polykey-CLI/node_modules/ts-node/src/index.ts:784:16)
    at createTranspileOnlyGetOutputFunction (/Users/soorya/Developer/Polykey-CLI/node_modules/ts-node/src/index.ts:1341:28)
    at createFromPreloadedConfig (/Users/soorya/Developer/Polykey-CLI/node_modules/ts-node/src/index.ts:1404:34)
    at phase4 (/Users/soorya/Developer/Polykey-CLI/node_modules/ts-node/src/bin.ts:543:44)
    at bootstrap (/Users/soorya/Developer/Polykey-CLI/node_modules/ts-node/src/bin.ts:95:10)
    at main (/Users/soorya/Developer/Polykey-CLI/node_modules/ts-node/src/bin.ts:55:10)
    at Object.<anonymous> (/Users/soorya/Developer/Polykey-CLI/node_modules/ts-node/src/bin.ts:800:3)

We tried a couple of things like npm install, npm clean-install, but nothing we tried worked on this. Interestingly, running npm run build worked and created a functional binary. So, the development environment on darwin does not work, but the building and distribution does.

We should fix the darwin development shell, as people could be using any development environment @CMCDragonkai @brynblack.

@CMCDragonkai
Copy link
Member

We only support Linux for flake based development shells. In macos or otherwise you have to use alternative systems like installing node/npm through some some package manager.

@CMCDragonkai
Copy link
Member

Macos is not considered a supported development system. We don't have resources to support it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

No branches or pull requests

3 participants