~gpanders

https://gpanders.com

Trackers

~gpanders/ijq

Last active 2 months ago

~gpanders/passage

Last active 1 year, 8 months ago

~gpanders/wk

Last active 2 years ago

~gpanders/pushbroom

Last active 2 years ago

#6 Keys containing slashes are not escaped 2 months ago

Comment by ~gpanders on ~gpanders/ijq

Thanks for the bug report, this should now be fixed on master. I will go ahead and cut a bugfix release as well.

#6 Keys containing slashes are not escaped 2 months ago

Comment by ~gpanders on ~gpanders/ijq

Gregory Anders referenced this ticket in commit 648e8ea.

REPORTED RESOLVED FIXED

#21 SIGSEGV in "builds list" with invalid access token 3 months ago

Ticket created by ~gpanders on ~emersion/hut

When the config file contains an invalid access token (e.g. a garbage value like "invalid_token"), running hut builds list results in a SIGSEGV.

System: macOS 12.3.1

Go version: go version go1.18.1 darwin/arm64

Config file:

instance "sr.ht" {
	access-token "something_fake"
}

Reproduce:

hut builds list

Stack trace:

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x2 addr=0x0 pc=0x100bb9d04]

goroutine 1 [running]:
main.newBuildsListCommand.func1(0x14000186000?, {0x1400014a740?, 0x2?, 0x2?})
	/Users/greg/src/hut/builds.go:318 +0x94
github.com/spf13/cobra.(*Command).execute(0x14000186000, {0x1400014a700, 0x2, 0x2})
	/Users/greg/.go/pkg/mod/github.com/spf13/cobra@v1.4.0/command.go:860 +0x4ac
github.com/spf13/cobra.(*Command).ExecuteC(0x14000154f00)
	/Users/greg/.go/pkg/mod/github.com/spf13/cobra@v1.4.0/command.go:974 +0x354
github.com/spf13/cobra.(*Command).Execute(...)
	/Users/greg/.go/pkg/mod/github.com/spf13/cobra@v1.4.0/command.go:902
github.com/spf13/cobra.(*Command).ExecuteContext(...)
	/Users/greg/.go/pkg/mod/github.com/spf13/cobra@v1.4.0/command.go:895
main.main()
	/Users/greg/src/hut/main.go:49 +0x29c

I ran it in Delve and pinpointed it to this line in builds.go:

for _, job := range jobs.Results {
	printJob(&job)
}

Printing jobs in Delve shows:

(dlv) p jobs
*git.sr.ht/~emersion/hut/srht/buildssrht.JobCursor {
	Results: []git.sr.ht/~emersion/hut/srht/buildssrht.Job len: 0, cap: 0, [],
	Cursor: *(unreadable invalid length: -486054628144709631),}

It looks to me like the cursor is invalid, but I could be misunderstanding what it's supposed to look like.

Notably, this does not happen with other commands such as hut todo list or hut lists list.

#5 Embed gojq 10 months ago

Comment by ~gpanders on ~gpanders/ijq

gojq (as a library) doesn't handle the standard jq command line flags or color. These would have to be re-implemented manually. Given that, I don't think the tradeoff is worth it.

REPORTED RESOLVED WONT_FIX

#5 Embed gojq 10 months ago

Ticket created by ~gpanders on ~gpanders/ijq

Use gojq instead of exec'ing jq. Removes jq as a dependency and is likely more performant.

#4 Filter not working with names that contain dashes 1 year, 18 days ago

Comment by ~gpanders on ~gpanders/ijq

v0.3.6 now automatically uses quotes around keys containing special characters.

REPORTED RESOLVED FIXED

#4 Filter not working with names that contain dashes 1 year, 18 days ago

Comment by ~gpanders on ~gpanders/ijq

ijq passes the filter you enter directly to jq without any modifications, so you need to put the quotes in ijq as well.

The quotes are not included in the auto-completion entries though, and maybe that is what you're referring to. I can look into automatically adding quotes around keys that need to be escaped in the autocomplete list.

#180 Mailing list name should not start with dot 1 year, 2 months ago

Comment by ~gpanders on ~sircmpwn/lists.sr.ht

#3 "bufio.Scanner: token too long" after piping in large file 1 year, 5 months ago

Comment by ~gpanders on ~gpanders/ijq

I updated the formula yesterday but forgot to git push after testing the changes... Thanks for the reminder.

#49 Separate username and repository from wiki title 1 year, 5 months ago

Comment by ~gpanders on ~sircmpwn/man.sr.ht

Looks like this was resolved by this commit.

REPORTED RESOLVED IMPLEMENTED