Closed LukeShu closed 2 months ago
v2:
v3:
ValueSource
from a type alias to a real typepkgConfigVer
definitionValues()
to VarValues()
!(version is 0.x or 1.[0-8].x)
instead of version is 1.9.x or 2.x
alecthomas/assert
instead of stretchr/testify
.v4:
pkgconfig.go
:gir/girgen/cmt
use go/doc/comment
.The comment change:
diff --git a/gir/pkgconfig/pkgconfig.go b/gir/pkgconfig/pkgconfig.go
index 5a6a1a0e4..98de502cb 100644
--- a/gir/pkgconfig/pkgconfig.go
+++ b/gir/pkgconfig/pkgconfig.go
@@ -57,9 +57,12 @@ func VarValues(varname string, pkgs ...string) (map[string]string, error) {
// users who have moved on to pkgconf.
// pkgconf 1.9.0+ (2022-08-07) doesn't let us query more than
- // one package at once. 1.9.0-1.9.4 do an inexplicably wrong
+ // one package at once (1.9.0-1.9.4 do an inexplicably wrong
// thing if we ask; 1.9.5 (2023-05-02) and later ignore all
- // packages except for the first one.
+ // packages except for the first one). So, if we see such a
+ // version, then make a separate call for each package. This
+ // is safe (if slow) in all cases, so we don't need to be
+ // concerned about false positives on the version number.
ver, err := pkgConfigVer()
if err != nil {
return nil, err
v5:
parseComment()
to convertMarkdownToComment()
v6:
preprocessDoc()
to preprocessMarkdown()
preprocessMarkdown()
and convertMarkdownToComment()
v7:
v8:
convertMarkdownToComment()
to convertMarkdownStringToGoDoc()
Sorry for all the churn.
v9:
gofmt
git diff -w
from v8 to v9:
diff --git a/gir/girgen/cmt/cmt.go b/gir/girgen/cmt/cmt.go
index fed36cb78..dcf6242e6 100644
--- a/gir/girgen/cmt/cmt.go
+++ b/gir/girgen/cmt/cmt.go
@@ -291,6 +291,7 @@ func goDoc(v interface{}, indentLvl int, opts []Option) string {
// Instead use CommentsTabWidth spaces, and count on the final
// gofmt step to turn them into tabs.
TextPrefix: strings.Repeat(" ", CommentsTabWidth*indentLvl) + "// ",
+ TextCodePrefix: strings.Repeat(" ", CommentsTabWidth*indentLvl) + "//\t",
}
cmtStr := string(printer.Text(cmt))
cmtStr = transformLines(cmtStr, func(n, d int, line string) string {
v10:
diff --git a/.github/workflows/qa.yml b/.github/workflows/qa.yml
index a4020f971..e1afc18ac 100644
--- a/.github/workflows/qa.yml
+++ b/.github/workflows/qa.yml
@@ -36,7 +36,7 @@ jobs:
- name: Run goimports
run: |
- goimports -w gir/ pkg/core/ pkg/cairo/
+ goimports -w .
git add .
if [[ -n "$(git status --porcelain)" ]]; then
PAGER= git diff --cached
v11:
Sorry for the lack of update on this PR. Can you rebase this with the latest changes and re-generate the PR?
v12:
go generate
after rebasing resulted in no changes.
Last year on Mastodon I teased that I was working on a proper GTK-Doc/GI-DocGen markup parser. (1) That turned out to be a lot bigger task than I originally anticipated, and (2) I stopped working on it for a while.
I'm now back to trying to push it over the finish line.
Here is some prep work that is mostly-unrelated to the bulk of the parser, that I figured I could go ahead and send your way.