Code Monkey home page Code Monkey logo

Comments (4)

marc-hb avatar marc-hb commented on June 25, 2024

Looks like a good catch. For the record can you please share the west version and some basic reproduction steps?

from west.

botbotty avatar botbotty commented on June 25, 2024

west version is v1.0.0

reproduction steps:

west init -m https://github.com/zephyrproject-rtos/example-application reproduction
cd reproduction/
west update

west example-west-command --help # so far so good

cat > patch.diff << EOF
--- a/example-application/scripts/example_west_command.py
+++ b/example-application/scripts/example_west_command.py
@@ -24,6 +24,7 @@ reflowed for you. You can also pass
 formatter_class=argparse.RawDescriptionHelpFormatter when calling
 parser_adder.add_parser() below if you want to keep your line
 endings.''')
+        self.manifest # Try to access manifest

     def do_add_parser(self, parser_adder):
         # This is a bit of boilerplate, which allows you full control over the
EOF
patch -p1 < patch.diff

west example-west-command --help # this will fail

from west.

mbolivar-nordic avatar mbolivar-nordic commented on June 25, 2024

Hmm, I believe we fixed this in 354b0e8. @botbotty the steps to reproduce you've posted are using self.manifest outside of WestCommand.do_run(), which is not legal. From the docstring for this property:

        '''Property for the manifest which was passed to run().

        If `do_run` was given a *manifest* kwarg, it is returned.
        Otherwise, a fatal error occurs.
        '''

Reading this property from the constructor is an attempt to read it before do_run() was called, so an error is not unexpected.

Can you make this happen in another way?

from west.

mbolivar-nordic avatar mbolivar-nordic commented on June 25, 2024

Can you make this happen in another way?

Please reopen with more details if so, thanks!

from west.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.