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

Update go bindings to version merged into nixos/nix #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

marcusramberg
Copy link

Opening this for discussion, currently it builds but has one test failure related to paths (leading . is stripped).

@farcaller
Copy link
Owner

I looked through this and the code is very clean, great job. Accessing the strings is so much nicer with the new API, too.

@farcaller
Copy link
Owner

@marcusramberg do you think there's anything else worth doing there or you're good with flipping the draft bit on this and merging it in?

@marcusramberg
Copy link
Author

@marcusramberg do you think there's anything else worth doing there or you're good with flipping the draft bit on this and merging it in?

I think the only concern I have is the failing test for path. It's unclear to me why it's returning /foo/bar for ./foo/bar input. ( https://github.com/farcaller/gonix/pull/2/files#diff-864944c880a2e4db1b8f93f33a58303d840fb4b6c50147cc2f915c6d48f7bf2cL173)

@farcaller
Copy link
Owner

I think this is blocked by NixOS/nix#10613. If it's "nix_init_path_from_absolute_path_string" indeed, then our test is broken.

@farcaller farcaller mentioned this pull request May 10, 2024
@farcaller
Copy link
Owner

I suggest we update the test case to use the absolute paths and merge this. We can revisit the behavior once NixOS/nix#10613 makes progress.

@marcusramberg
Copy link
Author

oki. I just tested updating the flake to nix master, and there's a new failure in the primop test:

❯ go test                                                                                                                                                                              devenv-shell-env
--- FAIL: ExampleRegisterGlobalPrimOp (0.00s)
got:
<nil>
want:
6
--- FAIL: ExampleState_NewPrimOp (0.00s)
panic: failed to call: nix error: error:
       … while calling the 'helloworlder' builtin

       error: Error from builtin function: Value already initialized. Variables are immutable [recovered]
        panic: failed to call: nix error: error:
       … while calling the 'helloworlder' builtin

       error: Error from builtin function: Value already initialized. Variables are immutable

I'll try to address that and change the test this weekend, and undraft the PR?

@marcusramberg
Copy link
Author

Updated the deps again today, and seems the issue was fixed upstream. All tests pass now.

@marcusramberg marcusramberg marked this pull request as ready for review May 28, 2024 22:45
@marcusramberg
Copy link
Author

Seems the fix was NixOS/nix@a942a34 (#10767)

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