ajoberstar / reckon

Infer a project's version from your Git repository.
Apache License 2.0
184 stars 28 forks source link

Soft fail if reckon isn't configured by the time `version.toString()` is called #174

Closed ajoberstar closed 2 years ago

ajoberstar commented 2 years ago

As noted in https://github.com/ajoberstar/reckon/issues/147, reckon sometimes isn't fully configured in time for other plugins that want to use the version.

One way to resolve this situation is to change the hard fail when reckon isn't fully configured to a soft fail. Return unspecified as the version value, but allow later attempts to use a reckoned version, presuming it is configured. Log a warning indicating reckon was evaluated too early (but only one of them) and log info level stacktraces each time it happens.