mongoose-os / mos

The Mongoose OS Command Line Tool - https://mongoose-os.com/docs/mongoose-os/quickstart/setup.md
Other
45 stars 31 forks source link

Bring back lib deduping/caching by name #63

Closed QRPp closed 3 years ago

QRPp commented 3 years ago

Make explicit setting of library names stricter, obviating the need to read manifests of overridden libraries. Slightly reduce build time as a side effect.

prepareLib(): include an extensive commentary of explicit library naming with rationales for allowing or forbidding every case of library name setting. Provide unit tests for all 9 cases commented, plus a test for the obviated reading of an unreadable but overridden library.

The primary driver for this change is the use case of overriding a library where the library source being overridden is inaccessible during building. This valuable use case can't be supported if determining the library name requires reading the manifest of the library being overridden.

rojer commented 3 years ago

make test fails:

    manifest_parser_test.go:103: open test_manifests/testset_10_lib_name_settings/test_01_mft_name/expected: no such file or directory
        /home/rojer/cesanta/mos/cli/manifest_parser/manifest_parser_test.go:152: 
    manifest_parser_test.go:165: testing "test_manifests/testset_10_lib_name_settings/test_01_no_name" for "esp32"
    manifest_parser_test.go:103: open test_manifests/testset_10_lib_name_settings/test_02_ref_name/expected: no such file or directory
        /home/rojer/cesanta/mos/cli/manifest_parser/manifest_parser_test.go:152: 

looks like a couple files have not been added to git.

rojer commented 3 years ago

sorry, my bad - my repo was busted, everything's fine.