Skip to content

Inconsistent build-tag naming for disabling batteries #954

Description

@ttn-ttn

Batteries are disabled with a no_<feature> build tag, paired with a builtins_<feature>_not.go stub carrying the same tag. Several places deviate from this:

  1. builtins_sxml_not.go is guarded by not_sxml, while builtins_sxml.go uses !no_sxml. The two tags don't match, so -tags no_sxml excludes both files and the build breaks:
$ go build -tags no_sxml github.com/refaktor/rye
batteries/builtins_structures.go:67:16: undefined: load_saxml_Dict batteries/register.go:56:27: undefined: Builtins_sxml
  1. builtins_term.go and builtins_termstr.go are guarded by b_no_term, while the other batteries use the no_<feature> form.

  2. Build scripts pass disable tags that no source file reads, so they have no effect:

  • no_termui in buildwasm and .goreleaser.yaml (the battery tag is no_tui)
  • b_no_io in build_tinygo (the battery tag is no_io)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions