Closed pilkjaer closed 4 years ago
Rule example that can be used (for 0.4.0 release): http_archive( name = "bazel_stardoc", sha256 = "6d07d18c15abb0f6d393adbd6075cd661a2219faab56a9517741f0fc755f6f3c", type = "tar.gz", urls = [ "https://github.com/bazelbuild/stardoc/archive/0.4.0.tar.gz", ],
Have you considered using http_archive
's trim_prefix
attribute to address this? The documentation calls out this exact use case and I hypothesize it would solve your issue.
@achew22 Thank you for the tips. Indeed having strip_prefix line in http_archive rule removed the need for the extra values when loading. Then release structure probably can be kept as is and change from git_repository to http_archive can be seen as an improvement suggestion.
When fetching sratdoc release there is additional stardoc-0.4.0 folder created inside of it. As a result, when fetching files using http_archive rule you can't reference code by just using startdoc, you need to include version number as well. Example:
In general, Bazel recommends using http_archive rules instead of git_repository rules (see here). Maybe you can update the instructions in getting_started_stardoc.md as well.