Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example panics with v0.6.1 and later #2258

Closed
jmooring opened this issue Dec 22, 2024 · 1 comment · Fixed by #2261
Closed

Example panics with v0.6.1 and later #2258

jmooring opened this issue Dec 22, 2024 · 1 comment · Fixed by #2261

Comments

@jmooring
Copy link

jmooring commented Dec 22, 2024

https://github.com/terrastruct/d2/blob/master/docs/examples/lib/1-d2lib/d2lib.go

This panics with v0.6.1 and later.

log
2024-12-22T09:07:32-08:00 WARN  missing slog.Logger in context, see lib/log.With stack=goroutine 1 [running]:
runtime/debug.Stack()
        /snap/go/10748/src/runtime/debug/stack.go:26 +0x5e
oss.terrastruct.com/d2/lib/log.from({0x1518440, 0x1badf20})
        /home/jmooring/go/pkg/mod/oss.terrastruct.com/[email protected]/lib/log/log.go:23 +0x5f
oss.terrastruct.com/d2/lib/log.Debug({0x1518440, 0x1badf20}, {0xc54d93, 0xe}, {0xc00065fb58, 0x2, 0x2})
        /home/jmooring/go/pkg/mod/oss.terrastruct.com/[email protected]/lib/log/log.go:53 +0x3c
oss.terrastruct.com/d2/d2layouts.LayoutNested({0x1518440, 0x1badf20}, 0xc00048a0e0, {0x0?, {0x0?, 0x0?}}, 0x145e278, 0x145e2f8)
        /home/jmooring/go/pkg/mod/oss.terrastruct.com/[email protected]/d2layouts/d2layouts.go:264 +0x14e5
oss.terrastruct.com/d2/d2lib.compile({0x1518440, 0x1badf20}, 0xc00048a0e0, 0xc00065fe78, 0xc00065fee0)
        /home/jmooring/go/pkg/mod/oss.terrastruct.com/[email protected]/d2lib/d2.go:107 +0x11f
oss.terrastruct.com/d2/d2lib.Compile({0x1518440, 0x1badf20}, {0xc45ff2, 0x6}, 0xc0000061c0?, 0xc000006101?)
        /home/jmooring/go/pkg/mod/oss.terrastruct.com/[email protected]/d2lib/d2.go:78 +0x346
main.main()
        /home/jmooring/code/go-sandbox/cmd/d2/main.go:31 +0xdd

2024-12-22T09:07:32-08:00 WARN  missing slog.Logger in context, see lib/log.With stack=goroutine 1 [running]:
runtime/debug.Stack()
        /snap/go/10748/src/runtime/debug/stack.go:26 +0x5e
oss.terrastruct.com/d2/lib/log.from({0x1518440, 0x1badf20})
        /home/jmooring/go/pkg/mod/oss.terrastruct.com/[email protected]/lib/log/log.go:23 +0x5f
oss.terrastruct.com/d2/lib/log.Debug({0x1518440, 0x1badf20}, {0xc437d6, 0x4}, {0xc000c07b58, 0x2, 0x2})
        /home/jmooring/go/pkg/mod/oss.terrastruct.com/[email protected]/lib/log/log.go:53 +0x3c
oss.terrastruct.com/d2/d2layouts.LayoutNested({0x1518440, 0x1badf20}, 0xc00048a0e0, {0x0?, {0x0?, 0x0?}}, 0x145e278, 0x145e2f8)
        /home/jmooring/go/pkg/mod/oss.terrastruct.com/[email protected]/d2layouts/d2layouts.go:339 +0x1a65
oss.terrastruct.com/d2/d2lib.compile({0x1518440, 0x1badf20}, 0xc00048a0e0, 0xc000c07e78, 0xc000c07ee0)
        /home/jmooring/go/pkg/mod/oss.terrastruct.com/[email protected]/d2lib/d2.go:107 +0x11f
oss.terrastruct.com/d2/d2lib.Compile({0x1518440, 0x1badf20}, {0xc45ff2, 0x6}, 0xc0000061c0?, 0xc000006101?)
        /home/jmooring/go/pkg/mod/oss.terrastruct.com/[email protected]/d2lib/d2.go:78 +0x346
main.main()
        /home/jmooring/code/go-sandbox/cmd/d2/main.go:31 +0xdd

@alixander
Copy link
Collaborator

alixander commented Dec 27, 2024

@jmooring These are just warnings, but still a good thing to fix, which I've done so here: #2261 . Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants