Comments (8)
Just FYI, tested with c936a4a and issue is fixed.
from west.
I can confirm that this bug is resolved in the v1.2.0 release of West.
from west.
To Reproduce
Manifest repo: https://github.com/GarrettCarter-eaton/west-quote-test-manifest
Dependency of manifest repo (containing quote in a branch name): https://github.com/GarrettCarter-eaton/west-quote-test-dep
west init -m https://github.com/GarrettCarter-eaton/west-quote-test-manifest
west update
- See error
I'm noticing the behavior differs depending on what revision of the dependency repo you specify. When I specify a git SHA, West seems to process all the refs in the repo which leads to the quote processing failure.
Expected behavior
Expect west update
to complete without failure. A single quote is a valid character in a git branch name in most systems.
Impact
Cannot complete the west update
, leaving my dependency tree incomplete.
Logs and console output
PS C:\west-quote-test> west init -m https://github.com/GarrettCarter-eaton/west-quote-test-manifest
=== Initializing in C:\west-quote-test
--- Cloning manifest repository from https://github.com/GarrettCarter-eaton/west-quote-test-manifest
Cloning into 'C:\west-quote-test\.west\manifest-tmp'...
remote: Enumerating objects: 15, done.
remote: Counting objects: 100% (15/15), done.
remote: Compressing objects: 100% (10/10), done.
remote: Total 15 (delta 4), reused 0 (delta 0), pack-reused 0
Receiving objects: 100% (15/15), done.
Resolving deltas: 100% (4/4), done.
--- setting manifest.path to west-quote-test-manifest
=== Initialized. Now run "west update" inside C:\west-quote-test.
PS C:\west-quote-test> west update
=== updating west-quote-test-dep (west-quote-test-dep):
--- west-quote-test-dep: initializing
Initialized empty Git repository in C:/west-quote-test/west-quote-test-dep/.git/
--- west-quote-test-dep: fetching, need revision bb4143e
remote: Enumerating objects: 9, done.
remote: Counting objects: 100% (9/9), done.
remote: Compressing objects: 100% (5/5), done.
remote: Total 9 (delta 0), reused 0 (delta 0), pack-reused 0
Unpacking objects: 100% (9/9), 1.93 KiB | 86.00 KiB/s, done.
From https://github.com/GarrettCarter-eaton/west-quote-test-dep
* [new branch] branch-with-'-quote -> refs/west/branch-with-'-quote
* [new branch] main -> refs/west/main
* [new branch] other-rev -> refs/west/other-rev
Traceback (most recent call last):
File "C:\Users\eXXXXXXX\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Users\eXXXXXXX\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 86, in _run_code
exec(code, run_globals)
File "C:\Users\eXXXXXXX\AppData\Local\Programs\Python\Python310\Scripts\west.exe\__main__.py", line 7, in <module>
File "C:\Users\eXXXXXXX\AppData\Local\Programs\Python\Python310\lib\site-packages\west\app\main.py", line 866, in main
app.run(argv or sys.argv[1:])
File "C:\Users\eXXXXXXX\AppData\Local\Programs\Python\Python310\lib\site-packages\west\app\main.py", line 111, in run
self.run_command(argv)
File "C:\Users\eXXXXXXX\AppData\Local\Programs\Python\Python310\lib\site-packages\west\app\main.py", line 383, in run_command
self.run_builtin(args, unknown)
File "C:\Users\eXXXXXXX\AppData\Local\Programs\Python\Python310\lib\site-packages\west\app\main.py", line 424, in run_builtin
File "C:\Users\eXXXXXXX\AppData\Local\Programs\Python\Python310\lib\site-packages\west\commands.py", line 194, in run
self.do_run(args, unknown)
File "C:\Users\eXXXXXXX\AppData\Local\Programs\Python\Python310\lib\site-packages\west\app\project.py", line 823, in do_run
self.update_all()
File "C:\Users\eXXXXXXX\AppData\Local\Programs\Python\Python310\lib\site-packages\west\app\project.py", line 888, in update_all
self.update(project)
File "C:\Users\eXXXXXXX\AppData\Local\Programs\Python\Python310\lib\site-packages\west\app\project.py", line 1062, in update
self.clean_refs_west(project, stats, take_stats)
File "C:\Users\eXXXXXXX\AppData\Local\Programs\Python\Python310\lib\site-packages\west\app\project.py", line 1350, in clean_refs_west
_clean_west_refspace(project)
File "C:\Users\eXXXXXXX\AppData\Local\Programs\Python\Python310\lib\site-packages\west\app\project.py", line 1524, in _clean_west_refspace
project.git(delete_ref_cmd)
File "C:\Users\eXXXXXXX\AppData\Local\Programs\Python\Python310\lib\site-packages\west\manifest.py", line 807, in git
cmd_list = shlex.split(cmd)
File "C:\Users\eXXXXXXX\AppData\Local\Programs\Python\Python310\lib\shlex.py", line 315, in split
return list(lex)
File "C:\Users\eXXXXXXX\AppData\Local\Programs\Python\Python310\lib\shlex.py", line 300, in __next__
token = self.get_token()
File "C:\Users\eXXXXXXX\AppData\Local\Programs\Python\Python310\lib\shlex.py", line 109, in get_token
raw = self.read_token()
File "C:\Users\eXXXXXXX\AppData\Local\Programs\Python\Python310\lib\shlex.py", line 191, in read_token
raise ValueError("No closing quotation")
ValueError: No closing quotation
PS C:\west-quote-test> west -V
West version: v1.0.0
PS C:\west-quote-test>
Environment
- OS: Windows
- Toolchain: Zephyr SDK
- West 1.0.0
from west.
Thanks @GarrettCarter-eaton for the test case, it really saved my time. Fix submitted in #683, would you be in a position to test it? Check the west/README.txt for installing directly from source. If you go and do that, do pip uninstall west
first.
from west.
Thanks for the report!
I think I know what's happening and how to fix it but this looks tedious to reproduce because the quote must be in a remote branch, not just in a local branch.
Can you share a public manifest/repo that reproduces? A small one if possible.
from west.
Can you share a public manifest/repo that reproduces? A small one if possible.
https://github.com/mbolivar-ampere/west/tree/test-'-for-marc
from west.
Thanks @mbolivar-ampere . I still cannot reproduce, probably because the management of refs/west/*
has changed.
@GarrettCarter-eaton which west version are you using? Please look at this bug template for "inspiration": https://github.com/zephyrproject-rtos/zephyr/issues/new?assignees=&labels=bug&projects=&template=001_bug_report.md&title=
from west.
Please re-open if not fixed by #683
from west.
Related Issues (20)
- log messages from west api modules are not being emitted as expected
- [RFC] New `inactive-by-default:` project key HOT 2
- Support `west manifest --resolve` and `--freeze` with `manifest.project-filter` HOT 1
- Follow up work for `manifest.project-filter` implementation
- west init: CLI argument to automatically setup new workspace from template HOT 11
- `already defined as extension command`-error prints wrong spec HOT 1
- Introduce absolute path variant of zephyr.base HOT 13
- west init access denied on windows HOT 2
- git: Add support for sparse checkout HOT 5
- Investigate if the performance of submodule update could be improved HOT 7
- west update loops infinitely over the first repository HOT 14
- West Re-Implementation - git ws
- west update - AttributeError: 'NoneType' object has no attribute 'err' HOT 1
- menuconfig aborting due to Kconfig warnings HOT 4
- Allow using reference repositories to share objects HOT 8
- Allow import of optional projects from manifest file HOT 7
- Moving from Zephyr 3.2.99 to 3.5.99: `west` cannot find its configuration file HOT 3
- --mr documents argument to be a revision HOT 1
- `pip install` fails on MSYS2 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from west.