Skip to content

Refactor the globals out of site build #2701

@bep

Description

@bep

There currently is a controlled, but careful, dance in the tests to set a set of global state before each test. While this is controlled and has no performance impact for the end result, it it not best practice, it is hard to reason about and it prevents us from using t.Parallel to potentially speed up the test suite.

We have done some considerably work around this area, so when we get some of the big PRs in the pipeline merged, it may be time.

From my head this means:

  • HugoSites should contain:
  • viper
  • template
  • hugofs
  • jww logger
  • translator/i18n bundles handling
  • image config cache

There are plenty of details left out in the above, but it should be complete in general.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions