aboutsummaryrefslogtreecommitdiff
path: root/tests/core/go_library/README.rst
blob: 4410902fe88b2d6e386b9e1adbaccbad18270007 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
Basic go_library functionality
==============================

.. _go_library: /docs/go/core/rules.md#_go_library
.. _#1262: https://github.com/bazelbuild/rules_go/issues/1262
.. _#1520: https://github.com/bazelbuild/rules_go/issues/1520
.. _#1772: https://github.com/bazelbuild/rules_go/issues/1772
.. _#2058: https://github.com/bazelbuild/rules_go/issues/2058
.. _#3558: https://github.com/bazelbuild/rules_go/issues/3558

empty
-----

Checks that a `go_library`_ will compile and link even if all the sources
(including assembly sources) are filtered out by build constraints.

asm_include
-----------

Checks that assembly files in a `go_library`_ may include other assembly
files in the same library. Verifies `#1520`_.

asm_header
----------

Checks that assembly files in a `go_library`_ may include ``"go_asm.h"``,
generated by the compiler. Verifies `#1262`_.

package_height
--------------

Checks that when a library embeds another library, the embedder's dependencies
may override the embeddee's dependencies. Verifies `#1772`_.

import_alias_test
-----------------

Checks that a library may import another library using one of the strings
listed in ``importpath_aliases``. This is the basic mechanism for minimal
module compatibility. Verifies `#2058`_.

embedsrcs_test
--------------

Checks that `go_library`_ can match ``//go:embed`` directives to files listed
in the ``embedsrcs`` attribute and can pass those files to the compiler.

embedsrcs_error_test
--------------------

Verifies common errors with ``//go:embed`` directives are correctly reported.

no_srcs_test
------------

Verifies that `go_library`_ targets without Go source files build concurrently,
even unsandboxed, and reproducibly. Verifies `#3558`_.