[gitignore] Only ignore go.mod/go.sum in checkout root

go.mod and go.sum files in unexpected places can cause issues with the
Go toolchain. That's especially bad now that we use the Go toolchain
directly for just-in-time building of `fx set`, so a mislocated go.mod
or go.sum file is enough to break `fx set`.

Such breakages appear especially mysterious because all go.mod and
go.sum files outside of an allow-list are gitignored. However, I believe
it's only necessary to gitignore go.mod or go.sum files in the root of
the checkout, as those are likely to be symlinks created by `fx
setup-go` to get Go editor integration to work. The other go.mod and
go.sum files created by `fx setup-go` are in directories like `out` and
`prebuilt` whose contents are entirely ignored by Git, so any
non-gitignored go.mod or go.sum files probably have no good reason to
exist anyway. Now at least they will be much more visible to the user so
it will be more obvious why `fx set` fails to build.

Bug: 80639
Change-Id: I9e995e54a5d0ff402bbe364cd9dde1bd97ead592
Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/558701
Reviewed-by: Tamir Duberstein <tamird@google.com>
Reviewed-by: Anirudh Mathukumilli <rudymathu@google.com>
Reviewed-by: Marc-Antoine Ruel <maruel@google.com>
Fuchsia-Auto-Submit: Oliver Newman <olivernewman@google.com>
Commit-Queue: Auto-Submit <auto-submit@fuchsia-infra.iam.gserviceaccount.com>
1 file changed
tree: b9466b115c5f94958d0e2a2e4f76d37ea05585e6
  1. boards/
  2. build/
  3. buildtools/
  4. bundles/
  5. docs/
  6. examples/
  7. garnet/
  8. products/
  9. scripts/
  10. sdk/
  11. src/
  12. third_party/
  13. tools/
  14. zircon/
  15. .clang-format
  16. .clang-tidy
  17. .git-blame-ignore-revs
  18. .gitattributes
  19. .gitignore
  20. .gn
  21. .style.yapf
  22. AUTHORS
  23. BUILD.gn
  24. CODE_OF_CONDUCT.md
  25. CONTRIBUTING.md
  26. LICENSE
  27. OWNERS
  28. PATENTS
  29. README.md
  30. rustfmt.toml
README.md

Fuchsia

Pink + Purple == Fuchsia (a new operating system)

What is Fuchsia?

Fuchsia is a modular, capability-based operating system. Fuchsia runs on modern 64-bit Intel and ARM processors.

Fuchsia is an open source project with a code of conduct that we expect everyone who interacts with the project to respect.

Read more about Fuchsia's principles.

How can I build and run Fuchsia?

See Getting Started.

Where can I learn more about Fuchsia?

See fuchsia.dev.