Page MenuHomeFreeBSD

libbsdconf: independent version macros
ClosedPublic

Authored by dteske on Wed, Sep 16, 4:27 AM.
Tags
None
Referenced Files
F172210442: D59720.id186833.diff
Wed, Sep 16, 9:34 PM
F172190033: D59720.diff
Wed, Sep 16, 5:50 PM
F172159975: D59720.id186833.diff
Wed, Sep 16, 12:56 PM
F172158611: D59720.diff
Wed, Sep 16, 12:45 PM
Subscribers

Details

Summary

sysconf(8) --version now prints the library version alongside its
own so each can move on its own clock. Assigning a bitmask to
bool already converts zero/nonzero; drop the redundant != 0 (fuz).

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

It sounds dangerous to have library and tool at different versions. Do you plan to keep a stable API? Do you test mismatching command and library versions with one another and/or expect them to work? If not, consider instead to enforce that both be updated in lock step.

lib/libbsdconf/bsdconf.c
428

At this point you can drop the parentheses, too.

This revision is now accepted and ready to land.Wed, Sep 16, 10:55 AM
In D59720#1370521, @fuz wrote:

It sounds dangerous to have library and tool at different versions.

Discussed offline together. They are not expected to be aligned and Semantic Versioning (SemVer) is being used to enable API tracking.

Do you plan to keep a stable API?

Yes.

Do you test mismatching command and library versions with one another and/or expect them to work?

They are not expected to stay in sync. They are expected to drift. Them being in sync here is pure coincidence.

If not, consider instead to enforce that both be updated in lock step.

When a change touches only the library, only the library version gets bumped. Likewise when only the utility code gets touched, only that version gets bumped. Only when both are touched at the same time do both get an appropriate version bump (and not necessarily the same type of bump -- for example, bumping library PATCH while bumping utilities MINOR)

This revision was automatically updated to reflect the committed changes.
dteske added inline comments.
lib/libbsdconf/bsdconf.c
428

Created D59745