-
Notifications
You must be signed in to change notification settings - Fork 7.5k
Spurious Error: "zephyr-no-west/samples/hello_world" is not in a west installation #14177
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Another workaround if you want to use Zephyr with and without west on the same computer is to install west in a virtualenv. I always do Zephyr development in a Python virtualenv anyway, because it wants such exact versions of all the dependencies that I don't want to have it interfering with my For managing virtualenvs I recommend: https://virtualenvwrapper.readthedocs.io/en/latest/ |
I'm a bit torn about whether to mark this an 'enhancement' or a low priority bug. @carlescufi, @tejlmand, what do you think? |
I always liked the subtitle of the "bug" label: "when things don't work as expected". It's nice because it's orthogonal to other things like severity and priority. So I think your question can be rephrased like this: is this "dual" use case meant to be already supported or not? |
This one bit me too, after I installed west to try out a fix with some Nordic stuff (in a separate directory) and then went back to main Zephyr. Definitely feels like a bug to me. I think it would be best to not check for a west installation within the main CMake files (if that's what's going on), and keep it as a separate layer instead. Too tangled up. |
OK, then I'm marking this low priority, since
@ulfalizer @marc-hb @carlescufi @tejlmand please speak up if you disagree with this.
The CMake files absolutely must check for a west installation in order to decide whether or not to use |
what is the final, intended scope of west? |
Looks good as long as this message is really just a spurious message than can be safely ignored and not the sign of some non obvious side-effect(s) that I haven't discovered yet. Can you confirm @mbolivar ?
Not sure what you mean @andrewboie |
|
@mbolivar I agree with this being a low-prio bug, feels exactly like that. |
This wasted quite a lot of time for me, so for me it's more than a low-prio. Apparently it hit other people too. In general, I think we should strive towards integrating the flashing helpers and the like into the main repo. West shouldn't be the thing that takes over because it's tangled up in everything and can't be cleanly separated. That's a bad way to do it. Small and independent easy-to-understand helpers are superior to blobby framework stuff. |
Hi @andrewboie
The scope was the set at the beginning of its development and it has never changed since. West was always going to be a meta-tool that would handle:
Please see this issue created a year ago: #6205 |
@mbolivar my suggested fix would be to query to the bootstrapper whether we find ourselves in an installation or not (that is in fact already possible with |
IMO this just will dig us deeper. All of the sudden we have west in virtualenv, installed on system level, boot-strappers, a clone of west, .west, ... This is starting to get very confusing, and I have been following the development of west since the beginning. |
I'm sure virtualenv is great for west developers. For me uninstalling and re-installing west takes a couple seconds max. Better having two workarounds to choose from than zero I guess :-)
Fair enough, I didn't notice: https://github.com/zephyrproject-rtos/zephyr/blob/588d7b068c91/scripts/requirements.txt PS: could @mbolivar, @carlescufi or some other west code expert confirm this message is not the sign of any side effect and can be safely ignored? In other words a proof that this bug is actually low severity. Ignoring the message: the most convenient "workaround" ever! |
https://docs.zephyrproject.org/latest/guides/west/repo-tool.html#introduction
I agree, I don't think virtualenv is a good solution. Instead I proposed one here: #14177 (comment)
I think it's a bug because we promised you'd always be able to build (though not flash) without west, and we are not pulling code from external repos that would require west to list them yet. See here: https://docs.zephyrproject.org/latest/guides/west/without-west.html |
I agree with your pointing out that this scope was written down a long time ago, but actually disagree with this being the "final" scope of west. I think of it as being the convenient front-end tool for doing zephyr development. From my perspective we can add features to it whenever it makes sense as we go.
Workaround, not solution :). But as stated, I believe virtualenvs are a good idea for independent reasons.
Good idea -- that will work even in a monorepo zephyr tree with ZEPHYR_BASE set.
You don't understand what I'm saying. Again, this was just a suggested workaround for not getting the (harmless) error message for people who:
And like I said, I would recommend using a virtualenv to anybody doing Zephyr development regardless of if they are using west. Beyond keeping our extremely exacting version requirements confined to their own sandbox, blowing away a virtualenv and setting it up again is a lot easier than trying to fix things when Zephyr-related pip commands break a |
You seem like you might be frustrated about west, which I can understand since workflow changes are always annoying, but this statement is missing an important (but subtle) point. You'll always be able to build Zephyr's kernel without west. But Zephyr is much more than a kernel; it's a batteries-included RTOS which integrates with a lot of other code, parts of which live in ext/ today. And as has been discussed ad nauseam elsewhere (including the issue @carlescufi linked to) all the code in ext/ is going to get split into its own repositories soon/eventually. Given that, the build system for Zephyr applications which want to use that code needs a way to find out where those repositories are somehow, since ZEPHYR_BASE on its own will no longer be enough. Since those repositories' locations in the west installation are fully specified in the west manifest, calling In fact, I would argue that doing anything else would be duplicative and redundant work. |
If one invokes cmake with west in the PATH but not inside a west installation (i.e. in a monorepo setup), west will try to list the zephyr modules issuing an error message. Test if west list succeeds before using result for module testing. Fixes zephyrproject-rtos#14177 Signed-off-by: Torsten Rasmussen <[email protected]> Signed-off-by: Carles Cufi <[email protected]>
If one invokes cmake with west in the PATH but not inside a west installation (i.e. in a monorepo setup), west will try to list the zephyr modules issuing an error message. Test if west list succeeds before using result for module testing. Fixes #14177 Signed-off-by: Torsten Rasmussen <[email protected]> Signed-off-by: Carles Cufi <[email protected]>
I cherry-picked the #14251 fix and confirm the error message is gone, thx! |
FWIW, I've never felt the need for or used |
|
Uh oh!
There was an error while loading. Please reload this page.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Everything builds without any error
Impact
(hopefully? )minor: confusing error message
Screenshots or console output
Then everything seems to build as usual (can someone confirm?)
Environment (please complete the following information):
Linux Fedora
Reproduced with either zephyr-0.9.5 or "host"
v1.14.0-rc1-849-g35b7fde8a60b
Additional context
workaround:
pip3 uninstall west
The text was updated successfully, but these errors were encountered: