You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add support for github refs when downloading Ark (#7645)
Adds support for specifying Ark versions as github refs in
`package.json`:
```ts
"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.
<!-- Thank you for submitting a pull request.
If this is your first pull request you can find information about
contributing here:
* https://github.com/posit-dev/positron/blob/main/CONTRIBUTING.md
We recommend synchronizing your branch with the latest changes in the
main branch by either pulling or rebasing.
-->
<!--
Describe briefly what problem this pull request resolves, or what
new feature it introduces. Include screenshots of any new or altered
UI. Link to any GitHub issues but avoid "magic" keywords that will
automatically close the issue. If there are any details about your
approach that are unintuitive or you want to draw attention to, please
describe them here.
-->
### Release Notes
<!--
Optionally, replace `N/A` with text to be included in the next release
notes.
The `N/A` bullets are ignored. If you refer to one or more Positron
issues,
these issues are used to collect information about the feature or
bugfix, such
as the relevant language pack as determined by Github labels of type
`lang: `.
The note will automatically be tagged with the language.
These notes are typically filled by the Positron team. If you are an
external
contributor, you may ignore this section.
-->
#### New Features
- N/A
#### Bug Fixes
- N/A
### QA Notes
<!--
Add additional information for QA on how to validate the change,
paying special attention to the level of risk, adjacent areas that
could be affected by the change, and any important contextual
information not present in the linked issues.
-->
This script handles downloading and installing the Ark R kernel, which is used by the Positron R extension to execute R code.
6
+
7
+
8
+
### Installation Methods
9
+
10
+
#### Release Mode (Production Use)
11
+
12
+
- Downloads pre-built binaries from GitHub releases
13
+
- Uses a semantic version number like `"0.1.182"`
14
+
- Example in package.json:
15
+
```json
16
+
"positron": {
17
+
"binaryDependencies": {
18
+
"ark": "0.1.182"
19
+
}
20
+
}
21
+
```
22
+
23
+
24
+
#### Local development mode
25
+
26
+
For kernel developers working directly on the Ark kernel, the script will check for locally built versions in a sibling `ark` directory before attempting to download or build from source.
27
+
28
+
Note that this has precedence over downloading Ark based on the version specified in `package.json` (both release and github references).
29
+
30
+
31
+
#### CI development Mode
32
+
33
+
- Clones and builds the Ark kernel from source using a GitHub repositoryreference
34
+
- Uses the format `"org/repo@branch_or_revision"`
35
+
- Examples in package.json:
36
+
```json
37
+
"positron": {
38
+
"binaryDependencies": {
39
+
"ark": "posit-dev/ark@main"// Use the main branch
40
+
"ark": "posit-dev/ark@experimental-feature"// Use a feature branch
41
+
"ark": "posit-dev/ark@a1b2c3d"// Use a specific commit
42
+
"ark": "posit-dev/ark@v0.1.183"// Use a specific tag
43
+
}
44
+
}
45
+
```
46
+
47
+
The repository reference format (`org/repo@branch_or_revision`) should only be used during development and never be merged into main or release branches. A GitHub Action (`prevent-repo-references.yml`) enforces this restriction by checking pull requests to main and release branches for this pattern.
48
+
49
+
50
+
### Authentication
51
+
52
+
When accessing GitHub repositories or releases, the script attempts to find a GitHub Personal Access Token (PAT) in the following order:
53
+
54
+
1. The `GITHUB_PAT` environment variable
55
+
2. The `POSITRON_GITHUB_PAT` environment variable
56
+
3. The git config setting `credential.https://api.github.com.token`
57
+
58
+
Providing a PAT is recommended to avoid rate limiting and to access private repositories.
59
+
60
+
61
+
## `compile-syntax.ts`
62
+
63
+
This script compiles TextMate grammar files for syntax highlighting.
64
+
65
+
66
+
## `post-install.ts`
67
+
68
+
This script performs additional setup steps after the extension is installed.
0 commit comments