Re: [go-nuts] Re: go run requires internet connection?

2020-04-09 Thread David Riley
I feel like it's 10.15 where Apple really started doubling down on their 
"notarization" service? I haven't updated anything to it because it breaks (by 
design) a number of things I regularly use, so it would be hard to say, but 
that has to be frustrating for developers who can't be constantly online.


- Dave


> On Apr 9, 2020, at 7:54 AM, Michael Jones  wrote:
> 
> Unable to reproduce the issue on MacOS Mojave 10.14.6, though I tried with 
> gusto.
> 
> On Thu, Apr 9, 2020 at 4:32 AM Tanmay Das  wrote:
> Thanks, everyone for your valuable comments. I think Brain is right. It might 
> be an OS-related issue. I really like how active this group is. I look 
> forward to coming back with more topics in the future. Stay Home. Stay Safe.

-- 
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/9A9C1172-116D-4B73-B799-6E9FF0E41EA3%40gmail.com.


[go-nuts] Re: go run requires internet connection?

2020-04-09 Thread Ronny Bangsund


On Thursday, April 9, 2020 at 1:01:31 PM UTC+2, Tanmay Das wrote:
>
> Running the executable: `./helloworld`
>
Maybe there's a log entry for your program specifically in Console (the GUI 
collecting macOS logs), or in one of the system logs.

If this is somehow related to GateKeeper, you could try making an exception 
for it:
spctl --add helloworld
(You'll get a popup to enter the admin password.)

Or removing all attributes:
xattr -d 

Although I'm not sure the last option will do much :)

-- 
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/4fb656e2-2600-41de-a298-d74f628d7a00%40googlegroups.com.


Re: [go-nuts] Re: go run requires internet connection?

2020-04-09 Thread Michael Jones
Unable to reproduce the issue on MacOS Mojave 10.14.6, though I tried with
gusto.

On Thu, Apr 9, 2020 at 4:32 AM Tanmay Das  wrote:

> Thanks, everyone for your valuable comments. I think Brain is right. It
> might be an OS-related issue. I really like how active this group is. I
> look forward to coming back with more topics in the future. Stay Home. Stay
> Safe.
>
> On Wednesday, April 8, 2020 at 10:17:36 PM UTC+6, Tanmay Das wrote:
>>
>> Hey Gophers,
>> My very first post here.
>>
>> Today I faced an unexpected power outage and I wanted to tinker with Go a
>> little bit. I wrote a simple hello world program and ran
>> go run helloworld.go
>>
>> Strangely the code didn't run. In fact, the terminal prompt never exited.
>> I kept running the same command over and over again but no luck. I checked
>> all my configurations, my env vars, etc. and everything was ok. After
>> ruling out all the possibilities it suddenly hit me: what if Go actually
>> requires an internet connection to run a program for no apparent reason? I
>> waited for the electricity to come back and as soon as I was connected to
>> the internet I ran `go run` command again and voilà!
>>
>> Is this behavior expected? If it is, why did the go authors make such a
>> decision? I mean making the internet connectivity a dependency for the
>> execution of a program sounds counter-productive to me, honestly. :(
>>
> --
> 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/8fc3b552-f5c4-43de-94ba-4e0d4511f79a%40googlegroups.com
> 
> .
>


-- 

*Michael T. jonesmichael.jo...@gmail.com *

-- 
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/CALoEmQyTgSTRDROSmgmKQAtJCzACv-aHPn7165tPjg0QVR-Smg%40mail.gmail.com.


[go-nuts] Re: go run requires internet connection?

2020-04-09 Thread Tanmay Das
Thanks, everyone for your valuable comments. I think Brain is right. It 
might be an OS-related issue. I really like how active this group is. I 
look forward to coming back with more topics in the future. Stay Home. Stay 
Safe.

On Wednesday, April 8, 2020 at 10:17:36 PM UTC+6, Tanmay Das wrote:
>
> Hey Gophers,
> My very first post here.
>
> Today I faced an unexpected power outage and I wanted to tinker with Go a 
> little bit. I wrote a simple hello world program and ran 
> go run helloworld.go
>
> Strangely the code didn't run. In fact, the terminal prompt never exited. 
> I kept running the same command over and over again but no luck. I checked 
> all my configurations, my env vars, etc. and everything was ok. After 
> ruling out all the possibilities it suddenly hit me: what if Go actually 
> requires an internet connection to run a program for no apparent reason? I 
> waited for the electricity to come back and as soon as I was connected to 
> the internet I ran `go run` command again and voilà! 
>
> Is this behavior expected? If it is, why did the go authors make such a 
> decision? I mean making the internet connectivity a dependency for the 
> execution of a program sounds counter-productive to me, honestly. :(
>

-- 
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/8fc3b552-f5c4-43de-94ba-4e0d4511f79a%40googlegroups.com.


[go-nuts] Re: go run requires internet connection?

2020-04-09 Thread Tanmay Das

>
> Therefore, I think it must be some issue with macOS being told to run an 
> executable it hasn't seen before, making a network connection.
>
You are probably right.

>  If you run it once successfully, and then remove the network connection, 
> does it run again OK?

It does. 

On Thursday, April 9, 2020 at 5:11:04 PM UTC+6, Brian Candler wrote:
>
> On Thursday, 9 April 2020 12:01:31 UTC+1, Tanmay Das wrote:
>>
>> Running the executable: `./helloworld`
>>
>>
> OK, then clearly it's not an issue with finding our downloading 
> dependencies: these will all have been resolved by the time the binary has 
> been compiled and linked.
>
> Therefore, I think it must be some issue with macOS being told to run an 
> executable it hasn't seen before, making a network connection.
>
> If you run it once successfully, and then remove the network connection, 
> does it run again OK?  (I would hope that it caches the result)
>

-- 
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/f84cb807-a4e3-4616-9aa1-c1a533e7822d%40googlegroups.com.


[go-nuts] Re: go run requires internet connection?

2020-04-09 Thread Brian Candler
On Thursday, 9 April 2020 12:01:31 UTC+1, Tanmay Das wrote:
>
> Running the executable: `./helloworld`
>
>
OK, then clearly it's not an issue with finding our downloading 
dependencies: these will all have been resolved by the time the binary has 
been compiled and linked.

Therefore, I think it must be some issue with macOS being told to run an 
executable it hasn't seen before, making a network connection.

If you run it once successfully, and then remove the network connection, 
does it run again OK?  (I would hope that it caches the result)

-- 
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/9a1ba436-1c7a-448e-bb3b-b6dd597066bc%40googlegroups.com.


[go-nuts] Re: go run requires internet connection?

2020-04-09 Thread Tanmay Das
Running the executable: `./helloworld`

Also note that, before building the executable, I tried running with `go 
run`, which of course, failed. I can't even say "Failed" because the go 
compiler was not throwing any error like *Hey, since I need to download 
some dependencies even though your program doesn't have one, you might 
wanna try running the program later.* The cursor just stuck in the terminal 
for eternity. I had to quit it with Ctrl + C.

On Thursday, April 9, 2020 at 4:15:50 PM UTC+6, Brian Candler wrote:
>
> On Thursday, 9 April 2020 06:15:22 UTC+1, Tanmay Das wrote:
>
>> I also forgot to mention one thing. I was able to build the program using 
>> go build. Even the executable was there. It just didn't run until I 
>> connected to internet.
>>
>>
> When you say "it just didn't run", do you mean with "go run ...", or 
> directly running the executable that you just built?
>
> If running the already-built executable hung, then I can only guess that 
> Apple are using a central service to check the fingerprints of executables 
> that haven't been seen before.  It would be interesting to run tcpdump at 
> the same time, to see if it's trying to do DNS lookups for some Apple 
> server.
>
> I also remember there are settings where you can send Apple information 
> about which applications you run (e.g. Preferences > Security & Privacy > 
> Privacy > Analytics > Share Mac Analytics).  But I'd be surprised if it did 
> that *before* the application started.
>

-- 
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/a8ba39d2-c874-42e1-a256-46ae77cd2e11%40googlegroups.com.


[go-nuts] Re: go run requires internet connection?

2020-04-09 Thread Brian Candler
On Thursday, 9 April 2020 06:15:22 UTC+1, Tanmay Das wrote:

> I also forgot to mention one thing. I was able to build the program using 
> go build. Even the executable was there. It just didn't run until I 
> connected to internet.
>
>
When you say "it just didn't run", do you mean with "go run ...", or 
directly running the executable that you just built?

If running the already-built executable hung, then I can only guess that 
Apple are using a central service to check the fingerprints of executables 
that haven't been seen before.  It would be interesting to run tcpdump at 
the same time, to see if it's trying to do DNS lookups for some Apple 
server.

I also remember there are settings where you can send Apple information 
about which applications you run (e.g. Preferences > Security & Privacy > 
Privacy > Analytics > Share Mac Analytics).  But I'd be surprised if it did 
that *before* the application started.

-- 
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/1f3ad08f-27bd-422f-8f7b-a792f048f527%40googlegroups.com.


[go-nuts] Re: go run requires internet connection?

2020-04-09 Thread Tanmay Das
Hmm, it makes sense. Still, there should be some caching mechanism. If the 
internet connection can't be established, load the dep from the cache.

On Thursday, April 9, 2020 at 1:14:33 PM UTC+6, Volker Dobler wrote:
>
> On Wednesday, 8 April 2020 18:17:36 UTC+2, Tanmay Das wrote:
>>
>> Is this behavior expected? If it is, why did the go authors make such a 
>> decision? I mean making the internet connectivity a dependency for the 
>> execution of a program sounds counter-productive to me, honestly. :(
>>
>
> Well, go run does not just execute a program. It compiles
> the program und executes the compiled binary. The execution
> part doesn't need any internet connectivity, but the compilation
> step _might_ need one of some dependencies are not available.
> This is one of the many problems with go run.
>
> But note that this is the case for each and every language:
> You cannot run Java, C#, Rust, FORTRAN, R, whatnot code
> if dependencies are missing and not retrievable.
>
> V. 
>

-- 
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/891f159c-8bf2-4c73-98b3-98fd75174bcf%40googlegroups.com.


[go-nuts] Re: go run requires internet connection?

2020-04-09 Thread Volker Dobler
On Wednesday, 8 April 2020 18:17:36 UTC+2, Tanmay Das wrote:
>
> Is this behavior expected? If it is, why did the go authors make such a 
> decision? I mean making the internet connectivity a dependency for the 
> execution of a program sounds counter-productive to me, honestly. :(
>

Well, go run does not just execute a program. It compiles
the program und executes the compiled binary. The execution
part doesn't need any internet connectivity, but the compilation
step _might_ need one of some dependencies are not available.
This is one of the many problems with go run.

But note that this is the case for each and every language:
You cannot run Java, C#, Rust, FORTRAN, R, whatnot code
if dependencies are missing and not retrievable.

V. 

-- 
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/a57fa76c-2636-4958-bce2-3161134e9fc5%40googlegroups.com.


[go-nuts] Re: go run requires internet connection?

2020-04-08 Thread Tanmay Das
No. OS X 10.15.3

On Thursday, April 9, 2020 at 11:40:51 AM UTC+6, Tamás Gulácsi wrote:
>
> Is it in Windows? Any antivirus may be involved?

-- 
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/6cfa2fc7-37b9-416d-b78a-b497d217a644%40googlegroups.com.


[go-nuts] Re: go run requires internet connection?

2020-04-08 Thread Tamás Gulácsi
Is it in Windows? Any antivirus may be involved?

-- 
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/7ebfabf8-f54d-4162-a3d4-dac6828b3662%40googlegroups.com.


[go-nuts] Re: go run requires internet connection?

2020-04-08 Thread Tanmay Das
I also forgot to mention one thing. I was able to build the program using 
go build. Even the executable was there. It just didn't run until I 
connected to internet.

On Wednesday, April 8, 2020 at 10:17:36 PM UTC+6, Tanmay Das wrote:
>
> Hey Gophers,
> My very first post here.
>
> Today I faced an unexpected power outage and I wanted to tinker with Go a 
> little bit. I wrote a simple hello world program and ran 
> go run helloworld.go
>
> Strangely the code didn't run. In fact, the terminal prompt never exited. 
> I kept running the same command over and over again but no luck. I checked 
> all my configurations, my env vars, etc. and everything was ok. After 
> ruling out all the possibilities it suddenly hit me: what if Go actually 
> requires an internet connection to run a program for no apparent reason? I 
> waited for the electricity to come back and as soon as I was connected to 
> the internet I ran `go run` command again and voilà! 
>
> Is this behavior expected? If it is, why did the go authors make such a 
> decision? I mean making the internet connectivity a dependency for the 
> execution of a program sounds counter-productive to me, honestly. :(
>

-- 
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/e8bfd7c9-206c-4b7e-b420-96753a3da726%40googlegroups.com.