BUG when building a project with junctions in non-strict mode
Summary
A stack trace when loading the project with a junction in non-strict mode.
Steps to reproduce
Use gnome-build-meta branch juerg/strip-variables (or any project with junction), and try bst --no-strict build core.bst.
What is the current bug behavior?
I get the following stack trace:
BUG join() argument must be str or bytes, not 'NoneType'
Traceback (most recent call last):
File "/home/abderrahim/.virtualenvs/bst-master/bin/bst", line 8, in <module>
sys.exit(cli())
File "/home/abderrahim/.virtualenvs/bst-master/lib/python3.7/site-packages/click/core.py", line 764, in __call__
return self.main(*args, **kwargs)
File "/home/abderrahim/dev/bst-master/buildstream/_frontend/cli.py", line 195, in override_main
standalone_mode=standalone_mode, **extra)
File "/home/abderrahim/.virtualenvs/bst-master/lib/python3.7/site-packages/click/core.py", line 717, in main
rv = self.invoke(ctx)
File "/home/abderrahim/.virtualenvs/bst-master/lib/python3.7/site-packages/click/core.py", line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/abderrahim/.virtualenvs/bst-master/lib/python3.7/site-packages/click/core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/abderrahim/.virtualenvs/bst-master/lib/python3.7/site-packages/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "/home/abderrahim/.virtualenvs/bst-master/lib/python3.7/site-packages/click/decorators.py", line 27, in new_func
return f(get_current_context().obj, *args, **kwargs)
File "/home/abderrahim/dev/bst-master/buildstream/_frontend/cli.py", line 387, in build
remote=remote)
File "/home/abderrahim/dev/bst-master/buildstream/_stream.py", line 242, in build
dynamic_plan=True)
File "/home/abderrahim/dev/bst-master/buildstream/utils.py", line 1303, in _gc_disabled
return func(*args, **kwargs)
File "/home/abderrahim/dev/bst-master/buildstream/_stream.py", line 1041, in _load
fetch_subprojects=fetch_subprojects)
File "/home/abderrahim/dev/bst-master/buildstream/_pipeline.py", line 113, in load
fetch_subprojects=fetch_subprojects)
File "/home/abderrahim/dev/bst-master/buildstream/_project.py", line 456, in load_elements
fetch_subprojects=fetch_subprojects)
File "/home/abderrahim/dev/bst-master/buildstream/_loader/loader.py", line 114, in load
element = loader._load_file(name, rewritable, ticker, fetch_subprojects)
File "/home/abderrahim/dev/bst-master/buildstream/_loader/loader.py", line 263, in _load_file
fetch_subprojects, dep.provenance)
File "/home/abderrahim/dev/bst-master/buildstream/_loader/loader.py", line 263, in _load_file
fetch_subprojects, dep.provenance)
File "/home/abderrahim/dev/bst-master/buildstream/_loader/loader.py", line 263, in _load_file
fetch_subprojects, dep.provenance)
File "/home/abderrahim/dev/bst-master/buildstream/_loader/loader.py", line 258, in _load_file
fetch_subprojects=fetch_subprojects, provenance=dep.provenance)
File "/home/abderrahim/dev/bst-master/buildstream/_loader/loader.py", line 559, in _get_loader
filename, element._get_cache_key())
File "/home/abderrahim/.virtualenvs/bst-master/lib/python3.7/posixpath.py", line 94, in join
genericpath._check_arg_types('join', a, *p)
File "/home/abderrahim/.virtualenvs/bst-master/lib/python3.7/genericpath.py", line 149, in _check_arg_types
(funcname, s.__class__.__name__)) from None
TypeError: join() argument must be str or bytes, not 'NoneType'
Possible fixes
Bisecting this gives it started happening in 352f4ad9. It seems element._get_cache_key() is returning None for some reason.
Other relevant information
- BuildStream version affected: current master 887461a5