xref: /aosp_15_r20/external/shflags/doc/RELEASE_NOTES-1.2.3.md (revision 63d4e48fb639f6414be0db9d718e3be2667e4fed)
1*63d4e48fSSadaf Ebrahimi# shFlags 1.2.3 Release Notes
2*63d4e48fSSadaf Ebrahimi
3*63d4e48fSSadaf Ebrahimihttps://github.com/kward/shflags
4*63d4e48fSSadaf Ebrahimi
5*63d4e48fSSadaf Ebrahimi## Preface
6*63d4e48fSSadaf Ebrahimi
7*63d4e48fSSadaf EbrahimiThis document covers any known issues and workarounds for the stated release of
8*63d4e48fSSadaf EbrahimishFlags.
9*63d4e48fSSadaf Ebrahimi
10*63d4e48fSSadaf Ebrahimi## Release info
11*63d4e48fSSadaf Ebrahimi
12*63d4e48fSSadaf EbrahimiThis is a minor bug fix and cleanup release.
13*63d4e48fSSadaf Ebrahimi
14*63d4e48fSSadaf EbrahimiThere were several minor changes thanks to feedback from a major code review by
15*63d4e48fSSadaf Ebrahimi[James Youngman](https://www.linkedin.com/in/jamesyoungman/). Thank you!
16*63d4e48fSSadaf Ebrahimi
17*63d4e48fSSadaf EbrahimiPlease see the `CHANGES-1.2.md` file for a complete list of changes.
18*63d4e48fSSadaf Ebrahimi
19*63d4e48fSSadaf Ebrahimi### Notable changes
20*63d4e48fSSadaf Ebrahimi
21*63d4e48fSSadaf EbrahimiNone.
22*63d4e48fSSadaf Ebrahimi
23*63d4e48fSSadaf Ebrahimi### Notable bug fixes
24*63d4e48fSSadaf Ebrahimi
25*63d4e48fSSadaf EbrahimiFixed the examples to work again with the new code structure. These broke when
26*63d4e48fSSadaf Ebrahimithe code was refactored for GitHub.
27*63d4e48fSSadaf Ebrahimi
28*63d4e48fSSadaf Ebrahimi## General info
29*63d4e48fSSadaf Ebrahimi
30*63d4e48fSSadaf Ebrahimi### The unit tests
31*63d4e48fSSadaf Ebrahimi
32*63d4e48fSSadaf EbrahimishFlags is designed to work on as many environments as possible, but not all
33*63d4e48fSSadaf Ebrahimienvironments are created equal. As such, not all of the unit tests will succeed
34*63d4e48fSSadaf Ebrahimion every platform. The unit tests are therefore designed to fail, indicating to
35*63d4e48fSSadaf Ebrahimithe tester that the supported functionality is not present, but an additional
36*63d4e48fSSadaf Ebrahimitest is present to verify that shFlags properly caught the limitation and
37*63d4e48fSSadaf Ebrahimipresented the user with an appropriate error message.
38*63d4e48fSSadaf Ebrahimi
39*63d4e48fSSadaf EbrahimishFlags tries to support both the standard and enhanced versions of `getopt`. As
40*63d4e48fSSadaf Ebrahimieach responds differently, and not everything is supported on the standard
41*63d4e48fSSadaf Ebrahimiversion, some unit tests will be skipped (i.e. ASSERTS will not be thrown) when
42*63d4e48fSSadaf Ebrahimithe standard version of `getopt` is detected. The reason being that there is no
43*63d4e48fSSadaf Ebrahimipoint testing for functionality that is positively known not to exist. A tally
44*63d4e48fSSadaf Ebrahimiof skipped tests will be kept for later reference.
45*63d4e48fSSadaf Ebrahimi
46*63d4e48fSSadaf Ebrahimi### Standard vs Enhanced getopt
47*63d4e48fSSadaf Ebrahimi
48*63d4e48fSSadaf EbrahimiHere is a matrix of the supported features of the various `getopt` variants.
49*63d4e48fSSadaf Ebrahimi
50*63d4e48fSSadaf EbrahimiFeature                                 | std | enh
51*63d4e48fSSadaf Ebrahimi--------------------------------------- | --- | ---
52*63d4e48fSSadaf Ebrahimishort option names                      | Y   | Y
53*63d4e48fSSadaf Ebrahimilong option names                       | N   | Y
54*63d4e48fSSadaf Ebrahimispaces in string options                | N   | Y
55*63d4e48fSSadaf Ebrahimiintermixing of flag and non-flag values | N   | Y
56*63d4e48fSSadaf Ebrahimi
57*63d4e48fSSadaf Ebrahimi## Known Issues
58*63d4e48fSSadaf Ebrahimi
59*63d4e48fSSadaf EbrahimiThe `getopt` version provided by default with all versions of Mac OS X (up to
60*63d4e48fSSadaf Ebrahimiand including 10.13.0) and Solaris (up to and including Solaris 10 and
61*63d4e48fSSadaf EbrahimiOpenSolaris) is the standard version.
62*63d4e48fSSadaf Ebrahimi
63*63d4e48fSSadaf Ebrahimi## Workarounds
64*63d4e48fSSadaf Ebrahimi
65*63d4e48fSSadaf EbrahimiThe Zsh shell requires the `shwordsplit` option to be set and the special
66*63d4e48fSSadaf Ebrahimi`FLAGS_PARENT` variable must be defined. See `src/shflags_test_helpers` to see
67*63d4e48fSSadaf Ebrahimihow the unit tests do this.
68