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

ride: init at 4.5.4097 #250627

Merged
merged 1 commit into from
May 15, 2024
Merged

ride: init at 4.5.4097 #250627

merged 1 commit into from
May 15, 2024

Conversation

TomaSajt
Copy link
Contributor

@TomaSajt TomaSajt commented Aug 21, 2023

Description of changes

This PR adds 1 package: ride

This name is quite simple so another option could be dyalog-ride.

Homepage: https://github.com/dyalog/ride

RIDE is a Remote IDE for Dyalog, so Dyalog is not a hard dependency of RIDE.
The package dyalog can be found in Nixpkgs, so you can use that for testing out the program.

For testing: In the startup window click on the arrow in the top-right corner and put "dyalog" as the executable path (the names of the binaries in dyalog.


Outside of Nixpkgs, RIDE would detect the installed versions of Dyalog (/opt/mdyalog).
We could patch this so that it lists the interpreters specified in an attribute. The issue with that is that when the interpreter's store path changes, the old interpreters nix path will remain in the interpreter selection box, and you would have to select the updated interpreter from the dropdown.
We could patch this also, so that if its a /nix/store/ path, it gets cleared if it isn't specified in the attribute.

Anyways, that's outside of the scope of this PR

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.

@ofborg ofborg bot added the 8.has: package (new) This PR adds a new package label Aug 21, 2023
@ofborg ofborg bot requested a review from markus1189 August 21, 2023 22:36
@TomaSajt TomaSajt marked this pull request as draft August 27, 2023 10:58
@TomaSajt TomaSajt changed the title ride: init at 4.5.3915 ride: init at 4.5.3952 Aug 27, 2023
@TomaSajt TomaSajt changed the title ride: init at 4.5.3952 ride: init at 4.4.3770 Aug 27, 2023
@TomaSajt TomaSajt marked this pull request as ready for review August 27, 2023 23:01
@TomaSajt TomaSajt marked this pull request as draft September 11, 2023 17:51
@TomaSajt TomaSajt marked this pull request as ready for review September 13, 2023 20:12
@fwam
Copy link
Contributor

fwam commented Sep 26, 2023

lgtm, tho, new version already

@TomaSajt
Copy link
Contributor Author

lgtm, tho, new version already

Yeah, I know about the newer versions, however, I'd rather not try to package the 4.5 pre-releases yet, as there are a lot of major changes being done right now.

@TomaSajt TomaSajt changed the title ride: init at 4.4.3770 ride: init at 4.5.4043 Oct 1, 2023
@TomaSajt
Copy link
Contributor Author

TomaSajt commented Oct 1, 2023

After looking at the newer versions more closely, I decided to go with the pre-release, as suggested.

@TomaSajt TomaSajt force-pushed the ride branch 6 times, most recently from 7a87731 to 368cf90 Compare March 2, 2024 01:15
Copy link
Contributor

@eliandoran eliandoran left a comment

Choose a reason for hiding this comment

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

Tried building and running ride locally on darwin64 but it crashes on startup:

image

logs.txt

@TomaSajt
Copy link
Contributor Author

TomaSajt commented Mar 3, 2024

Tried building and running ride locally on darwin64 but it crashes on startup

Thank you for checking it out
I am not really sure what might cause it to crash, but I have a few guesses.

@eliandoran
Copy link
Contributor

@TomaSajt ,

FYI the build now fails with:

npm ERR! gyp info find Python using Python version 3.11.7 found at "/nix/store/pwr22740f2pv36q5g28l1gjdg1bw43zm-python3-3.11.7/bin/python3"
npm ERR! gyp WARN read config.gypi ENOENT: no such file or directory, open '/nix/store/8fd6cfhx8x83zsizc926d5jggyj7si32-nodejs-20.11.1-source/include/node/config.gypi'
npm ERR! gyp info spawn /nix/store/pwr22740f2pv36q5g28l1gjdg1bw43zm-python3-3.11.7/bin/python3
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args '/nix/store/3js5vd0wabgacgc4ry7vzgai01xz1mfk-nodejs-20.11.1/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
npm ERR! gyp info spawn args 'binding.gyp',
npm ERR! gyp info spawn args '-f',
npm ERR! gyp info spawn args 'make',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/private/tmp/nix-build-ride-4.5.4097.drv-0/source/node_modules/cpu-features/build/config.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/nix/store/3js5vd0wabgacgc4ry7vzgai01xz1mfk-nodejs-20.11.1/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/nix/store/8fd6cfhx8x83zsizc926d5jggyj7si32-nodejs-20.11.1-source/common.gypi',
npm ERR! gyp info spawn args '-Dlibrary=shared_library',
npm ERR! gyp info spawn args '-Dvisibility=default',
npm ERR! gyp info spawn args '-Dnode_root_dir=/nix/store/8fd6cfhx8x83zsizc926d5jggyj7si32-nodejs-20.11.1-source',
npm ERR! gyp info spawn args '-Dnode_gyp_dir=/nix/store/3js5vd0wabgacgc4ry7vzgai01xz1mfk-nodejs-20.11.1/lib/node_modules/npm/node_modules/node-gyp',
npm ERR! gyp info spawn args '-Dnode_lib_file=/nix/store/8fd6cfhx8x83zsizc926d5jggyj7si32-nodejs-20.11.1-source/$(Configuration)/node.lib',
npm ERR! gyp info spawn args '-Dmodule_root_dir=/private/tmp/nix-build-ride-4.5.4097.drv-0/source/node_modules/cpu-features',
npm ERR! gyp info spawn args '-Dnode_engine=v8',
npm ERR! gyp info spawn args '--depth=.',
npm ERR! gyp info spawn args '--no-parallel',
npm ERR! gyp info spawn args '--generator-output',
npm ERR! gyp info spawn args 'build',
npm ERR! gyp info spawn args '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! gyp info spawn make
npm ERR! gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
npm ERR! In file included from ../src/binding.cc:1:
npm ERR! In file included from /nix/store/8fd6cfhx8x83zsizc926d5jggyj7si32-nodejs-20.11.1-source/src/node.h:73:
npm ERR! In file included from /nix/store/8fd6cfhx8x83zsizc926d5jggyj7si32-nodejs-20.11.1-source/deps/v8/include/v8.h:21:
npm ERR! In file included from /nix/store/ymw82wxygwr9mia2qnh6a7pbw6jr2rjw-libcxx-16.0.6-dev/include/c++/v1/memory:884:
npm ERR! In file included from /nix/store/ymw82wxygwr9mia2qnh6a7pbw6jr2rjw-libcxx-16.0.6-dev/include/c++/v1/__memory/allocate_at_least.h:13:
npm ERR! In file included from /nix/store/ymw82wxygwr9mia2qnh6a7pbw6jr2rjw-libcxx-16.0.6-dev/include/c++/v1/__memory/allocator_traits.h:14:
npm ERR! In file included from /nix/store/ymw82wxygwr9mia2qnh6a7pbw6jr2rjw-libcxx-16.0.6-dev/include/c++/v1/__memory/construct_at.h:23:
npm ERR! /nix/store/ymw82wxygwr9mia2qnh6a7pbw6jr2rjw-libcxx-16.0.6-dev/include/c++/v1/new:355:14: error: no member named 'aligned_alloc' in the global namespace
npm ERR!     return ::aligned_alloc(__alignment, __size > __rounded_size ? __size : __rounded_size);
npm ERR!            ~~^
npm ERR! 1 error generated.
npm ERR! make: *** [cpufeatures.target.mk:133: Release/obj.target/cpufeatures/src/binding.o] Error 1
npm ERR! gyp ERR! build error 
npm ERR! gyp ERR! stack Error: `make` failed with exit code: 2
npm ERR! gyp ERR! stack at ChildProcess.<anonymous> (/nix/store/3js5vd0wabgacgc4ry7vzgai01xz1mfk-nodejs-20.11.1/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:209:23)
npm ERR! gyp ERR! System Darwin 23.4.0
npm ERR! gyp ERR! command "/nix/store/3js5vd0wabgacgc4ry7vzgai01xz1mfk-nodejs-20.11.1/bin/node" "/nix/store/3js5vd0wabgacgc4ry7vzgai01xz1mfk-nodejs-20.11.1/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd /private/tmp/nix-build-ride-4.5.4097.drv-0/source/node_modules/cpu-features
npm ERR! gyp ERR! node -v v20.11.1
npm ERR! gyp ERR! node-gyp -v v10.0.1
npm ERR! gyp ERR! not ok

@eliandoran
Copy link
Contributor

Running bin/ride instead of using open on the app seems to crash but display an additional error in the logs:

[7229:0303/151658.677513:ERROR:gpu_process_host.cc(985)] GPU process launch failed: error_code=1003
[7229:0303/151658.683098:ERROR:network_service_instance_impl.cc(663)] Network service crashed, restarting service.
[7229:0303/151658.687809:ERROR:gpu_process_host.cc(985)] GPU process launch failed: error_code=1003
[7229:0303/151658.694056:ERROR:network_service_instance_impl.cc(663)] Network service crashed, restarting service.
[7229:0303/151658.695176:ERROR:gpu_process_host.cc(985)] GPU process launch failed: error_code=1003
[7229:0303/151658.700833:ERROR:network_service_instance_impl.cc(663)] Network service crashed, restarting service.
[7229:0303/151658.701697:ERROR:gpu_process_host.cc(985)] GPU process launch failed: error_code=1003
[7229:0303/151658.708398:ERROR:network_service_instance_impl.cc(663)] Network service crashed, restarting service.
[7229:0303/151658.709181:ERROR:gpu_process_host.cc(985)] GPU process launch failed: error_code=1003

Wonder if this might have something to do with it:

Error 1003 can also indicate that your helper apps are not signed and thus are prevented to be launched by gatekeeper. This is required when you use the helper apps without a bundle. If you need some signed (and notarized) helper processes, you can pull them (in certain versions) from my jcefbuild repository on GitHub here: https://github.com/jcefmaven/jcefbuild (I only upload versions that also have a java-cef version, but they all include the normal c++ version from spotify)

Ref: https://magpcss.org/ceforum/viewtopic.php?t=18984

@TomaSajt
Copy link
Contributor Author

TomaSajt commented Mar 3, 2024

These helper scripts are inside the upstream repo
https://github.com/Dyalog/ride/tree/master/CI/packagescripts/osx
Unfortunately I don't really have any experience with signing apps (probably needs some secrets) and neither do I really want to spend more time on fixing this, so I might just need to mark this as broken for darwin. Thanks for the help @eliandoran

I'll make some final attempts based on

chmod -R u+w Electron.app
export CSC_IDENTITY_AUTO_DISCOVERY=false
sed -i "/afterSign/d" electron-builder-linux-mac.json

Which seems to disable code signing. (This is from one of the few source-built darwin-supported electron apps inside nixpkgs)

@TomaSajt
Copy link
Contributor Author

TomaSajt commented Mar 3, 2024

@ofborg build ride

@TomaSajt
Copy link
Contributor Author

TomaSajt commented Mar 3, 2024

@eliandoran could you please try to run it once more?

@eliandoran
Copy link
Contributor

@TomaSajt , tested on da28cb88fde50cf15f079335342140cd9d5af927 and unfortunately the problem is still there. I propose you mark it as broken for darwin now. Shouldn't be a problem to fix it in the future.

@TomaSajt
Copy link
Contributor Author

TomaSajt commented Mar 3, 2024

Alright, I marked it as broken for Darwin.

@TomaSajt TomaSajt changed the title ride: init at 4.5.4043 ride: init at 4.5.4097 Mar 17, 2024
@TomaSajt TomaSajt force-pushed the ride branch 3 times, most recently from cc35532 to 81b7d95 Compare March 22, 2024 13:22
@TomaSajt TomaSajt force-pushed the ride branch 2 times, most recently from 26f6bba to a486260 Compare May 14, 2024 11:18
@TomaSajt
Copy link
Contributor Author

Okay, I removed the darwin specific code for now. Once this gets merged, I'll open another PR that adds back those changes.

@drupol drupol merged commit 7c3c783 into NixOS:master May 15, 2024
26 checks passed
@TomaSajt TomaSajt mentioned this pull request May 21, 2024
13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants