Skip to content

Add support for github refs when downloading Ark #7645

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

Merged
merged 4 commits into from
Aug 8, 2025
Merged

Conversation

lionel-
Copy link
Contributor

@lionel- lionel- commented May 12, 2025

Written with the help of Claude as agent.

Adds support for specifying Ark versions as github refs in package.json:

  "positron": {
    "binaryDependencies": {
      "ark": "posit-dev/ark@main"                  // Use the main branch
      "ark": "posit-dev/ark@experimental-feature"  // Use a feature branch
      "ark": "posit-dev/ark@a1b2c3d"               // Use a specific commit
      "ark": "posit-dev/ark@v0.1.183"              // Use a specific tag
    }
  }

The github revision is downloaded, built, and installed.

This allows CI-testing a branch in the Positron repo against a branch in the Ark repo without having to release Ark first. Releasing just for the purpose of testing is really not ideal as the feature might not be working well yet and other developers might need to do further Ark releases to make progress with their own work.

To prevent committing a dev ref that might have been forgotten in the package.json file, a github action watches changes to this file and checks that a release version is used.

Release Notes

New Features

  • N/A

Bug Fixes

  • N/A

QA Notes

Copy link

github-actions bot commented May 12, 2025

E2E Tests 🚀
This PR will run tests tagged with: @:critical

readme  valid tags

@lionel- lionel- force-pushed the feature/ark-dev branch 4 times, most recently from 6cc8917 to 901b38b Compare August 7, 2025 14:11
@lionel- lionel- requested a review from jmcphers August 7, 2025 16:06
jmcphers
jmcphers previously approved these changes Aug 7, 2025
Copy link
Collaborator

@jmcphers jmcphers left a comment

Choose a reason for hiding this comment

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

LGTM overall, worked great when I tried it out. A .ps.ark.version() shows that Positron picks up the freshly compiled version:

> .ps.ark.version()
                                                                 branch 
                                                                 "main" 
                                                                 commit 
                                                             "21f11d9c" 
                                                                   date 
                                              "2025-08-07 12:12:36 PDT" 
                                                                 flavor 
                                                              "release" 
                                                                   path 
"/Users/jmcphers/git2/positron/extensions/positron-r/resources/ark/ark" 
                                                                version 
                                                              "0.1.201" 


console.log('Building Ark from source...');

const buildOutput = await executeCommand('cargo build --release', undefined, tempDir);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Since this is for development only, would the debug build be preferable?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I thought so as well but: posit-dev/ark#619

By the way, when R crashes the only symptom surfacing from startLanguageRuntime() is an error about "http request failed". I assume this is from supervisor. https://github.com/posit-dev/positron/actions/runs/16799688806/job/47580232540#step:12:448

Starting language runtime failed. Reason: HTTP request failed

Would it be helpful to open an issue about this?

lionel- added 3 commits August 8, 2025 04:48
Log output

Run Ark to check it's runnable

Build for release
@lionel- lionel- merged commit bb6ef51 into main Aug 8, 2025
10 checks passed
@lionel- lionel- deleted the feature/ark-dev branch August 8, 2025 08:51
@github-actions github-actions bot locked and limited conversation to collaborators Aug 8, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants