• Home
Name Date Size #Lines LOC

..--

embedsrcs_static/04-Jul-2025-

BUILD.bazelD04-Jul-20253.4 KiB169147

README.rstD04-Jul-20251.7 KiB5740

def.bzlD04-Jul-2025581 2321

embedsrcs_error_test.goD04-Jul-20252.7 KiB139101

embedsrcs_gen_test.go.inD04-Jul-2025697 2117

embedsrcs_simple_test.goD04-Jul-202594 73

embedsrcs_test.goD04-Jul-20254.6 KiB200167

empty_bar.goD04-Jul-202530 41

empty_baz.sD04-Jul-202517 20

empty_foo.goD04-Jul-202530 41

empty_main.goD04-Jul-202529 42

gen_embedsrcs_files.goD04-Jul-20251.2 KiB5234

import_alias_a_v2.goD04-Jul-2025657 182

import_alias_b.goD04-Jul-2025654 182

import_alias_test.goD04-Jul-2025934 3416

inc.goD04-Jul-202512 21

inc_asmhdr.sD04-Jul-202520 21

inc_bar.sD04-Jul-202521 21

inc_foo.sD04-Jul-20250 10

no_srcs_test.goD04-Jul-20251.9 KiB7954

package_height.goD04-Jul-2025103 74

package_height_dep_deep.goD04-Jul-202556 85

package_height_dep_shallow.goD04-Jul-202529 42

package_height_embeddee.goD04-Jul-202571 85

package_height_embedder.goD04-Jul-202527 42

README.rst

1Basic go_library functionality
2==============================
3
4.. _go_library: /docs/go/core/rules.md#_go_library
5.. _#1262: https://github.com/bazelbuild/rules_go/issues/1262
6.. _#1520: https://github.com/bazelbuild/rules_go/issues/1520
7.. _#1772: https://github.com/bazelbuild/rules_go/issues/1772
8.. _#2058: https://github.com/bazelbuild/rules_go/issues/2058
9.. _#3558: https://github.com/bazelbuild/rules_go/issues/3558
10
11empty
12-----
13
14Checks that a `go_library`_ will compile and link even if all the sources
15(including assembly sources) are filtered out by build constraints.
16
17asm_include
18-----------
19
20Checks that assembly files in a `go_library`_ may include other assembly
21files in the same library. Verifies `#1520`_.
22
23asm_header
24----------
25
26Checks that assembly files in a `go_library`_ may include ``"go_asm.h"``,
27generated by the compiler. Verifies `#1262`_.
28
29package_height
30--------------
31
32Checks that when a library embeds another library, the embedder's dependencies
33may override the embeddee's dependencies. Verifies `#1772`_.
34
35import_alias_test
36-----------------
37
38Checks that a library may import another library using one of the strings
39listed in ``importpath_aliases``. This is the basic mechanism for minimal
40module compatibility. Verifies `#2058`_.
41
42embedsrcs_test
43--------------
44
45Checks that `go_library`_ can match ``//go:embed`` directives to files listed
46in the ``embedsrcs`` attribute and can pass those files to the compiler.
47
48embedsrcs_error_test
49--------------------
50
51Verifies common errors with ``//go:embed`` directives are correctly reported.
52
53no_srcs_test
54------------
55
56Verifies that `go_library`_ targets without Go source files build concurrently,
57even unsandboxed, and reproducibly. Verifies `#3558`_.