cesanta / mos-tool

The Mongoose OS command line tool
https://mongoose-os.com/software.html
24 stars 14 forks source link

Importing a lib with a bad version causes the mos build tool to hang silently #15

Closed chrismilleruk closed 6 years ago

chrismilleruk commented 6 years ago

The build tool apparently looks for a branch or tag in the library git repo matching the requested library version (falls back to mos tool version). If a branch or tag is not found, and the version doesn't look like a git hash, then the tool hangs silently.

I discovered this after following the steps to create a new library (locally) and then attempted to migrate my local library to github. This could also occur if a new version of the mos tool is released and a (3rd party?) library hasn't yet added the tag.

Environment: MacOS High Sierra 10.13.6 (17G65)

Repro steps: 1) Take any working mos application. 2) Modify any lib to have a version that doesn't exist.

      - origin: https://github.com/mongoose-os-libs/ca-bundle
        version: 2.x.y

3) Build using mos build --local --verbose

Expected behaviour:

Actual behaviour:

Note that building with mos build --local --verbose --logtostderr will report the following: given version "2.x.y" is neither a branch nor a tag ... but this is a little too buried and doesn't tell you which library is at fault.

rojer commented 6 years ago

i believe the "hanging" part was addressed by https://github.com/cesanta/mos-tool/commit/102bfdcad1826f600b8b93cf2be34d65bed739d1

the silent part does not appear to be the case - Error: preparing local copy of the lib "demo-bundle": given version "foo" is neither a branch nor a tag is the last line in the output, and it does not require --verbose or --logtostderr (in case of build failure build log is dumped to stderr).