juhp / fbrnch

Tool to update fedora packages branches
https://hackage.haskell.org/package/fbrnch
GNU General Public License v2.0
23 stars 3 forks source link

Help is broken without product-versions.json #10

Closed QuLogic closed 3 years ago

QuLogic commented 4 years ago

I mentioned on IRC that product-versions.json broke somehow, though I managed to fix it. This is not a report about that. Rather, it is a report that --help/-h broke while that file is missing.

Even if product-versions.json cannot be downloaded or is invalid, --help should never be broken. Command-line options should be checked before doing anything, just in case --help is requested.

juhp commented 4 years ago

Yeah I noticed this too while trying to build the package in copr (I ended up disabling the manpage because I wanted to get the release out, but maybe I was too cavalier on this :-( ).

Actually I am not completely sure what is going on/wrong - the cached json file should expire every 6 hours: seems like something could be wrong there, though in retrospect I realized I should have renamed the name along with the content change.

Let me try to change it so that it doesn't happen anymore.

juhp commented 4 years ago

Just for reference the json file will become now an array of the product versions.

juhp commented 4 years ago

Ah I found the actual problem: the cabal build (which I use for copr) was still using an older broken commit for the pdc lib - no wonder it wasn't working. :-(

juhp commented 4 years ago

Ah I found the actual problem: the cabal build (which I use for copr) was still using an older broken commit for the pdc lib - no wonder it wasn't working. :-(

That should be fixed in fbrnch-0.4-2

QuLogic commented 4 years ago

Also, if the JSON is invalid, then tab complete doesn't work.

juhp commented 4 years ago

I have added some further changes in git on Sunday to further prevent this from re-occurring: renamed the json file and also removed it's early parsing in main (essentially removing the last clever ""skeumorphism"" from the option processing).

Thank you for reporting this bug.