tweag / nix_bazel_codelab

Nix+Bazel Codelab
Apache License 2.0
50 stars 4 forks source link

Add exercise to create Go build instructions with Gazelle #15

Closed fricklerhandwerk closed 1 year ago

fricklerhandwerk commented 2 years ago

Is your feature request related to a problem? Please describe. Best practice would be not to manually collect Go dependencies, but Gazelle generate the rules.

Describe the solution you'd like Write a tutorial section on how to do this.

Additional context Migrated from to-do-list in README.

GuillaumeGen commented 1 year ago

In #31 I suggest to completely remove the use of gazelle. An alternative could be to completely change section 2 in "run bazel run //:gazelle". I am not sure of what would be the interest of such an exercise, but it would indeed be closer to the best practices. If we do so, we do not want this command to alter our solutions file, a solution could be to rename the solution files BUILD.bazel.solution and to modify the lab script accordingly. On my computer in a pure nix-shell (so probably on others too) invoking gazelle also run the code formatter. It means that the code written by the user for exercise 1 is altered by exercise 2.

GuillaumeGen commented 1 year ago

I splitted #31 , this is now in #38 .