Bug 266455 - devel/chroma: Update of devel/chroma fails for unclear reason
Summary: devel/chroma: Update of devel/chroma fails for unclear reason
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Yuri Victorovich
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-09-17 04:27 UTC by Yuri Victorovich
Modified: 2022-09-17 14:59 UTC (History)
1 user (show)

See Also:


Attachments
patch (7.64 KB, patch)
2022-09-17 04:27 UTC, Yuri Victorovich
no flags Details | Diff
chroma-2.3.0.diff (4.91 KB, patch)
2022-09-17 14:51 UTC, Dmitri Goutnik
no flags Details | Diff
chroma-2.3.0.diff (4.91 KB, patch)
2022-09-17 14:55 UTC, Dmitri Goutnik
dmgk: maintainer-approval?
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yuri Victorovich freebsd_committer freebsd_triage 2022-09-17 04:27:58 UTC
Created attachment 236620 [details]
patch

I am trying to upgrade devel/chroma with the attached patch but it fails:

> ===>  Building chroma from ./cmd/chroma
> main module (github.com/alecthomas/chroma/v2) does not contain package github.com/alecthomas/chroma/v2/cmd/chroma
Comment 1 Dmitri Goutnik freebsd_committer freebsd_triage 2022-09-17 14:51:41 UTC
Created attachment 236634 [details]
chroma-2.3.0.diff

It fails because ./cmd/chroma now is in the different module, go detects this and refuses to build.

Normally, setting GO_MODULE=github.com/alecthomas/chroma/v2/cmd/chroma would work, but for this port it doesn't because https://github.com/alecthomas/chroma/issues/528#issuecomment-866370115.

So the hack here would be to stick to modules2tuple, but generate GH_TUPLE manually using go.mod from ./cmd/chroma, e.g.

$ git clone https://github.com/alecthomas/chroma.git
$ cd chroma/cmd/chroma
$ go mod vendor
$ modules2tuple ./vendor/modules.txt | sed '/chroma/d'

(Ignore generated post-extract caused by nonsensical replace directive in go.mod.)

Personally, I'd just stop packaging this port until upstream comes to their senses and makes it go-gettable again.
Comment 2 Dmitri Goutnik freebsd_committer freebsd_triage 2022-09-17 14:55:57 UTC
Created attachment 236635 [details]
chroma-2.3.0.diff

Attached the wrong patch, sorry.