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

Emit bindings for oldrel-1 #244

Closed
wants to merge 21 commits into from
Closed

Conversation

andyquinterom
Copy link
Contributor

@andyquinterom andyquinterom commented Jun 13, 2024

Fixes #243

I want to add cases for version that do not fit on the devel, oldrel, etc schema.

Many companies still use R 4.2 for example so I believe this is relevant.

@CGMossa Perhaps adding an emit-binding could also be helpful?

@CGMossa
Copy link
Member

CGMossa commented Jun 13, 2024

Yes you need to add lines to the matrix, where emit binding is true.

Then you need a commit with the text containing [generate bindings] for the ci to push generated commits onto this PR.

If you do this properly, I can approve it and it will be done much faster I guess...

@andyquinterom
Copy link
Contributor Author

@CGMossa

Done I guess. Let me know if there is any left

@CGMossa
Copy link
Member

CGMossa commented Jun 13, 2024

Let's run ci... And see

@andyquinterom
Copy link
Contributor Author

Once CI is done I'll send a new commit adding MacOs x86 to the matrix.

@andyquinterom
Copy link
Contributor Author

@CGMossa the Check if [generate bindings] is is failing. Perhaps because I have by branch on a fork?

@CGMossa
Copy link
Member

CGMossa commented Jun 13, 2024

I would also like to take this opportunity, to tell you, about some of the constraints we need to consider here. If we want libR-sys + extendr to be CRAN complaint, there is a limit on how large a package we can send. For every version of R, and every supported platform, we have a relatively large text file embedded in these packages, and they have a noticeable effect on the package size.

Are you sure your company can't upgrade to 4.3?

@CGMossa
Copy link
Member

CGMossa commented Jun 13, 2024

/bindings

@andyquinterom
Copy link
Contributor Author

I would also like to take this opportunity, to tell you, about some of the constraints we need to consider here. If we want libR-sys + extendr to be CRAN complaint, there is a limit on how large a package we can send. For every version of R, and every supported platform, we have a relatively large text file embedded in these packages, and they have a noticeable effect on the package size.

Are you sure your company can't upgrade to 4.3?

It's not mostly on my side. It's specifically for the package orbweaver. We are in the process of getting it to our users, but many of them are on different R versions.

If we want R packages (with Rust) that are widely used I think having wide support for atleast recent R versions is important.

A strategy could be compressing the bindings into a tar ball with gzip? This is already done with the vendored solution for CRAN. This could be integrated in the build.rs step maybe?

@CGMossa
Copy link
Member

CGMossa commented Jun 13, 2024

@CGMossa the Check if [generate bindings] is is failing. Perhaps because I have by branch on a fork?

Apparently, this is an issue, but I fixed it via ref: ${{ github.event.pull_request.head.sha }}. Thank you ChatGPT 🤷

@andyquinterom
Copy link
Contributor Author

@CGMossa the Check if [generate bindings] is is failing. Perhaps because I have by branch on a fork?

Apparently, this is an issue, but I fixed it via ref: ${{ github.event.pull_request.head.sha }}. Thank you ChatGPT 🤷

Amazing! I will push a commit filling in the blanks now that everything seems to work

@andyquinterom
Copy link
Contributor Author

The job meant to create the PR with the generated bindings failed because of the same ref to sha error.

https://github.com/extendr/libR-sys/actions/runs/9495244689/job/26167470383

I just sent a commit to fix it

@CGMossa
Copy link
Member

CGMossa commented Jun 13, 2024

The job meant to create the PR with the generated bindings failed because of the same ref to sha error.

https://github.com/extendr/libR-sys/actions/runs/9495244689/job/26167470383

I just sent a commit to fix it

I don't think that's the cause. We have two mechanisms for generating bindings in PRs. I just told you about one. And you can see that it worked, before the PR has now updated bindings for all versions. Except for R 4.2. I've looked at the generated file that comes out of the CI run you specified, and it looks like it has the right R version, and that it has changed. But somehow it is not being pushed.

@CGMossa
Copy link
Member

CGMossa commented Jun 13, 2024

Sorry, I've looked as thoroughly as I can right now, and I don't see what the issue is. We made a lot of progress on this.. I hope you can nail the last issue, but I personally just can't see it. Feel free to ask questions, I'll try to answer as fast as I can.

@andyquinterom
Copy link
Contributor Author

@CGMossa I think the issue is that I am on a fork. Which makes sense why CI cannot find a branch, since this branch does not exist on the main repository. Any chance we could take this branch to the repo?

@CGMossa
Copy link
Member

CGMossa commented Jun 13, 2024

/bindings

@CGMossa
Copy link
Member

CGMossa commented Jun 13, 2024

Let me test this.. Because clearly some files were updated just now. Look at the file menu, and see the changes. Those come from the update mechanism. After this, I'll push your branch to this repo and see if that's the issue.

@andyquinterom
Copy link
Contributor Author

As you can see on flow https://github.com/extendr/libR-sys/actions/runs/9495808517

It seems /bindings is running on commit 09d76ad which is the master branch not this branch.

This is the reason the new bindings are not being included.

@andyquinterom
Copy link
Contributor Author

I think I narrowed it down to

      - name: Switch branch (/bindings command)
        if: github.event_name == 'issue_comment'
        uses: r-lib/actions/pr-fetch@v2
        with:
          repo-token: ${{ secrets.GITHUB_TOKEN }}

I still believe it may be an issue due to forks

@andyquinterom
Copy link
Contributor Author

@CGMossa what do you think?

@andyquinterom andyquinterom requested a review from CGMossa June 13, 2024 08:17
@CGMossa
Copy link
Member

CGMossa commented Jun 13, 2024

I think you're right. I came to a same conclusion just now. Let me try something. I'll ping back when I'm done.

@CGMossa CGMossa changed the title Add additional test cases for CI on specific R version Emit bindings for oldrel-1 Jun 13, 2024
@CGMossa
Copy link
Member

CGMossa commented Jun 13, 2024

I can't get it to work.

@CGMossa CGMossa closed this Jun 13, 2024
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.

Duplicate definition of Rf_isS4
2 participants