r-universe-org / help

Support and bug tracker for R-universe
https://docs.r-universe.dev/
8 stars 2 forks source link

How to specify commit of dependent package #141

Closed TimTaylor closed 2 years ago

TimTaylor commented 2 years ago

In the packages.json is there a way to specify the commit SHA we wish to use of a dependency?

jeroen commented 2 years ago

IIRC you could set the branch actually to a commit hash, at least that is the intention:

https://github.com/r-universe-org/sync/blob/ca74a1f621cc1137167563f86d6cb7a4f72483f1/R/monorepos.R#L233-L235

But I don't think I ever tested that, so let me know if it works :) In any case, maybe creating a tag for that hash is a safer approach.

TimTaylor commented 2 years ago

That worked! Cheers.

But I don't think I ever tested that, so let me know if it works :) In any case, maybe creating a tag for that hash is a safer approach.

Yeah - if it's ever really important I'll probably just fork and add the fork to packages.json but great to know this works!