go:generate

10 views
Skip to first unread message

Stephen Read

unread,
Nov 5, 2024, 3:38:39 PM11/5/24
to emergen...@googlegroups.com

What do you have to do to run  //go:generate ?

Will it be run when you do “go build” or “go run” ? Or is there a command that needs to be run before you can do a go build or go run?

 

Stephen J. Read

Mendel B. Silberberg Professor of Social Psychology

Department of Psychology

University of Southern California

Los Angeles, CA 90089-1061

Website: www.stephenjread.com

 

 

 

Kai O'Reilly

unread,
Nov 5, 2024, 3:44:13 PM11/5/24
to emergent-users
You have to run "go generate" to activate the //go:generate comment directive. "go build", "go run", "core run", etc do not run go generate for you; you must run "go generate" separately whenever you change the definition or documentation of a struct type in a sim.

Stephen Read

unread,
Nov 5, 2024, 10:53:03 PM11/5/24
to Kai O'Reilly, emergent-users

Thank you, that is what I thought.  Is that documented anywhere, other than in the go documentation?

Best, Steve

--
You received this message because you are subscribed to the Google Groups "emergent-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to emergent-user...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/emergent-users/7ac75c40-425f-4bc8-a616-b1ed7f31660cn%40googlegroups.com.

Kai O'Reilly

unread,
Nov 6, 2024, 1:27:21 PM11/6/24
to emergent-users
No, that is not documented anywhere. I will add a documentation page on generated code to the Cogent Core website soon, which we can link to on the Comp Cog Neuro website.
Reply all
Reply to author
Forward
0 new messages