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

Redefine R-devel's Rcomplex #156

Merged
merged 18 commits into from
Apr 22, 2023
Merged

Redefine R-devel's Rcomplex #156

merged 18 commits into from
Apr 22, 2023

Conversation

CGMossa
Copy link
Member

@CGMossa CGMossa commented Apr 12, 2023

Instead of fighting everything, we can just provide functions that help us manipulate Rcomplex through C99 / C11.

Depends on:

@CGMossa
Copy link
Member Author

CGMossa commented Apr 12, 2023

/bindings

@CGMossa
Copy link
Member Author

CGMossa commented Apr 12, 2023

/bindings

@CGMossa
Copy link
Member Author

CGMossa commented Apr 13, 2023

@yutannihilation do you know how I could solve this? I need the generated bindings before this can pass ci.

@yutannihilation
Copy link
Contributor

I can't see what's happening here... Do you mean you can generate bindings on your local?

I guess you have to add create_rcomplex (and other functions as well?) to allowlist.

@CGMossa
Copy link
Member Author

CGMossa commented Apr 13, 2023

If I run cargo build --features use-bindgen first, then a bindings are generated, and then calls like cargo test work without a problem.

@CGMossa
Copy link
Member Author

CGMossa commented Apr 13, 2023

/bindings

@yutannihilation
Copy link
Contributor

Then, I have no idea. I might have time to look into at night, sorry.

@CGMossa
Copy link
Member Author

CGMossa commented Apr 13, 2023

Yeah no problem. I wouldn't ask for more. Thanks for attempting to solve it quickly.

@yutannihilation
Copy link
Contributor

Sorry, now I understand what you meant. I think the current CI setup is wrong. This says "Run tests on precomputed bindings shipped with libR-sys," but I guess the intent of this is to test against the new bindings generated on the previous step. This is probably my mistake when I tweaked the settings to upload the bindings as artifacts.

# Run tests again using different bindings
- name: Run tests on precomputed bindings shipped with libR-sys
run: |
. ./ci-cargo.ps1
foreach ($target in ($env:RUST_TARGETS).Split(",")) {
if(($env:NO_TEST_TARGETS).Split(",").Contains($target)) {
echo "::warning:: Skipping tests for target: $target"
}
else {
ci-cargo test -vv $(if ($target -ne 'default') {"--target=$target"} ) '--' --nocapture --test-threads=1 -ActionName "Running tests for target: $target"
}
}
env:
NO_TEST_TARGETS: ${{ join(matrix.config.no-test-targets, ',') }}

@CGMossa
Copy link
Member Author

CGMossa commented Apr 14, 2023

Repurposing this pull-request. @Ilia-Kosenkov suggested a replacement in the wrapper. On my end, it looks like it works. Thus I'll push that. Hopefully CI will be sorted and this can be reviewed+merged soon.

@CGMossa CGMossa force-pushed the full_r_complex_fix branch from 3f43004 to e6567b8 Compare April 14, 2023 21:10
@CGMossa
Copy link
Member Author

CGMossa commented Apr 14, 2023

/bindings

@CGMossa
Copy link
Member Author

CGMossa commented Apr 14, 2023

CI passes because now we aren't really requiring much from it. The changes @yutannihilation mentioned still need to happen.

This works on ExtendR locally, but it needs to be merged for us to know.

I could add tests to this. They should atleast include an array test for this.

@CGMossa CGMossa changed the title Provide initialiser for Rcomplex from R-devel. Redefine R-devel's Rcomplex Apr 15, 2023
CGMossa added a commit to extendr/extendr that referenced this pull request Apr 15, 2023
to check test on CI
@CGMossa
Copy link
Member Author

CGMossa commented Apr 15, 2023

/bindings

@CGMossa
Copy link
Member Author

CGMossa commented Apr 17, 2023

/bindings

@CGMossa CGMossa requested a review from Ilia-Kosenkov April 21, 2023 11:14
Copy link
Member

@Ilia-Kosenkov Ilia-Kosenkov left a comment

Choose a reason for hiding this comment

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

LGTM. The conflicts are due to the new version of R-devel, so just accept whatever changes your PR introduces over existing files.

@yutannihilation
Copy link
Contributor

Oh, oldrel is already switched to R 4.2, which means it will never pass until we update the CI setting. You can ignore the CI failure for now.

@yutannihilation
Copy link
Contributor

I'd like to regenerate the bindings on master to slide the version, so let me merge this before that.

@yutannihilation yutannihilation merged commit 4cfba12 into master Apr 22, 2023
@yutannihilation yutannihilation deleted the full_r_complex_fix branch April 22, 2023 23:51
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.

3 participants