Re: [go-nuts] Ghost/indirect dependency on a custom package

2024-02-20 Thread Mike Schinkel
Is there no `cmd/migrations/go.mod`?

Have you not tried debugging with Delve?

-Mike

On Tuesday, February 20, 2024 at 5:29:19 AM UTC-5 Peter Bočan wrote:

> That seems to work on the repo/go.mod level, if I am not mistaken. I would 
> need something finer on the binary/compilation unit level. 
>
> Peter.
> On Tuesday 20 February 2024 at 10:19:04 UTC Jan Mercl wrote:
>
>> On Tue, Feb 20, 2024 at 11:07 AM Peter Bočan  wrote: 
>>
>> > Is there a way to debug this? Is there a way to step over the 
>> initialisation order? 
>>
>> I try to get help from '$ go mod graph' in similar investigations. 
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/3eb0f13b-6043-47b6-88ea-614e0231ba5en%40googlegroups.com.


Re: [go-nuts] Ghost/indirect dependency on a custom package

2024-02-20 Thread Peter Bočan
That seems to work on the repo/go.mod level, if I am not mistaken. I would 
need something finer on the binary/compilation unit level. 

Peter.
On Tuesday 20 February 2024 at 10:19:04 UTC Jan Mercl wrote:

> On Tue, Feb 20, 2024 at 11:07 AM Peter Bočan  wrote:
>
> > Is there a way to debug this? Is there a way to step over the 
> initialisation order?
>
> I try to get help from '$ go mod graph' in similar investigations.
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/3386f95d-d991-4851-ad05-3069b18f1b7an%40googlegroups.com.


Re: [go-nuts] Ghost/indirect dependency on a custom package

2024-02-20 Thread Jan Mercl
On Tue, Feb 20, 2024 at 11:07 AM Peter Bočan  wrote:

> Is there a way to debug this? Is there a way to step over the initialisation 
> order?

I try to get help from '$ go mod graph' in similar investigations.

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/CAA40n-X8cnxAWpAJY%2BLq%3D4kvRtMi%2Badv6ahQ9G5z4_0A0SnctA%40mail.gmail.com.


[go-nuts] Ghost/indirect dependency on a custom package

2024-02-20 Thread Peter Bočan
Hello Gophers!

I am facing a very odd issue. I have recently joined a company and wrote a 
small database migration binary which is co-located in the same github repo 
as the service which database migrations it. 

For whatever reason the DB migration binary, when it runs on the cluster, 
it manages to connect to AWS SQS and consume messages from a queue, however 
I don't see any direct and indirect dependency on the package which 
implements the SQS connectivity.

The service (the repo in which the binary is located) does consume the SQS 
package. Just to be clear, we have a "utils" repo (yea, I know.) 
which contains all the fun bits among which is this SQS client library. 

service (repo) -> utils (repo)
migrations (binary) -> utils (repo) but only uses the database package. 

The migrations binary is compiled from the repo root directory: go build 
cmd/migrations/main.go 

I am fairly dumbfounded and have a very hard time tracking the dependency 
(initialization) order. On the upside there are no relevant "init" 
functions. 

Is there a way to debug this? Is there a way to step over the 
initialisation order?

Cheers,
Peter. 

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/a5ba4b91-f00d-495d-9eb7-016a612c9761n%40googlegroups.com.