LoopPerfect / buckaroo

The decentralized package manager for C++ and friends 🏝️
https://buckaroo.pm
MIT License
935 stars 33 forks source link

v0.1.2 Update command throws NullPointerException #79

Closed voldyman closed 7 years ago

voldyman commented 7 years ago

The UpdateCommand class returns null from the routine() method where it should return IO.println("Not Implemented yet!")

Due to this there is a null pointer exception which is not helpful.

to reproduce this error add the following test to v1.1.2

  @Test
    public void testUpdateParserNiy() throws Exception {
        final CLICommand updateCommand = CLIParsers.commandParser.parse("update");
        updateCommand.routine().run(IOContext.fake());
        assertTrue("Should Reach here", true);
    }
njlr commented 7 years ago

Do you mean v0.1.2? v1.1.2 doesn't exist yet!

voldyman commented 7 years ago

oops, typo :)

njlr commented 7 years ago

In v0.1.2 the update command is indeed not working. It is also not documented.

The idea behind update was to provide a way for the user to update the dependencies installed in their project after the cookbook has been updated. With the current commands, this is equivalent to:

# Remove the buckaroo folder from your project directory
rm -rf ./buckaroo/

# Run install again
buckaroo install

This should be fixed in v1.2.0, which resolves dependencies slightly differently to v0.1.*.

@nikhedonia should we patch v0.1.2?

njlr commented 7 years ago

If you want to fetch the latest version of the cookbook, the command is:

buckaroo upgrade
voldyman commented 7 years ago

Yup, figured that out but a lot of command's routine method still return null in v 0.1.2.

Feel free to mark it won't fix if you want to, I got this version because homebrew provided v0.1.2

njlr commented 7 years ago

Now that v1.2.0 I think we can mark this as won't fix.

The documentation for upgrade and update has been updated.