*** ghishadow_ has joined #buildstream | 09:31 | |
*** tristan has joined #buildstream | 09:37 | |
*** ChanServ sets mode: +o tristan | 09:38 | |
*** ssam2 has joined #buildstream | 10:09 | |
*** ghishadow_ has quit IRC | 10:15 | |
*** tristan has quit IRC | 11:58 | |
*** csoriano has joined #buildstream | 12:15 | |
*** tristan has joined #buildstream | 12:35 | |
*** ChanServ sets mode: +o tristan | 12:36 | |
*** tristan has quit IRC | 15:07 | |
*** tristan has joined #buildstream | 15:46 | |
ironfoot | tristan: am I right thinking that the case of "submodules" concept that baserock definitions has is still not supported in BuildStream? | 15:51 |
---|---|---|
ironfoot | oh, no, it looks like it's is supported | 15:53 |
* ironfoot finds buildstream/plugins/sources/git.py docstring | 15:53 | |
*** csoriano has left #buildstream | 16:25 | |
tristan | ironfoot, its not implemented, and the plan is not to use git submodules at all (nor is buildstream tied into having projects stored in any particular VCS) | 16:32 |
tristan | ironfoot, rather the plan is to have a 'pipeline' element (or search for a better name for that), which is basically an element you can depend on, and has a BuildStream project as it's Source | 16:33 |
tristan | i.e. recursive pipelines | 16:33 |
tristan | I think it should be able to tie into the same scheduler too, BuildStream is written with this in mind, each loaded project is a Project object, yet there is only one Context which is to be shared between any loaded recursive pipelines | 16:34 |
tristan | Also, a project has it's own context of plugins for this reason (since plugins can be provided by users) | 16:34 |
tristan | Ohhh | 16:34 |
tristan | ironfoot, I totally just got excited and was talking about how projects can be modular and come together and totally missed your real question sorry :D | 16:35 |
tristan | hah | 16:35 |
tristan | yes, simple answer, submodules of a Git source itself are supported in the same way (with basically the same syntax) | 16:35 |
ironfoot | :P | 16:36 |
ironfoot | I, of course, don't know all the implementation decisions for BuildStream yet | 16:37 |
tristan | yeah I just remembered that whole thread on baserock-dev where I proposed submodules, and described to you how I mean to do it instead :) | 16:37 |
ironfoot | but one day :) | 16:37 |
ironfoot | I'm just spending some time in defs2bst.py | 16:37 |
tristan | If you like, I put it up there in case you might want to yeah :) | 16:38 |
tristan | that's next on the list, since we have all the functionality we need to build a converted system | 16:38 |
tristan | beyond that; we needz Source implementations ! | 16:38 |
tristan | I find the docstrings are more easily readable... in the docs, fwiw: https://people.gnome.org/~tvb/buildstreamdocs/sources/git.html#module-git | 16:39 |
tristan | :) | 16:39 |
ironfoot | that's nice | 16:42 |
tristan | base format is entirely documented, each plugin is self documenting too :) | 16:45 |
tristan | the element plugins particularly, provide a .yaml file defining their defaults; which is just reused verbatim as documentation | 16:45 |
tristan | ironfoot, a subtle note about conversions; baserock has 2 separate distutils "build-systems", with BuildStream we use on distutils element kind: https://people.gnome.org/~tvb/buildstreamdocs/elements/distutils.html#module-distutils | 16:58 |
ironfoot | thanks for the heads up | 16:59 |
ironfoot | I'm at the moment stuck with the submodules dict | 16:59 |
ironfoot | _yaml.py:node_get is not doing it right I think | 17:00 |
ironfoot | `submodules = _yaml.node_get(node, dict, Symbol.SUBMOD, default_value={})` returns: | 17:03 |
ironfoot | CommentedMap([('documentation/designdocument/cls', CommentedMap([('url', 'http://github.com/Pelagicore/Pelagicore-LaTeX-Class.git'), ('__bst_provenance_info', <buildstream._yaml.DictProvenance object at 0x7fafc9678668>)])), ('__bst_provenance_info', <buildstream._yaml.DictProvenance object at 0x7fafc96785f8>)]) | 17:03 |
tristan | That looks correct to me | 17:07 |
tristan | CommentedMap is ruamel-foo for hiding details about roundtrip loading | 17:08 |
tristan | And __bst_provenance_info is _yaml.PROVENANCE_KEY (which is ignored by node_items in defs2bst.py) | 17:09 |
tristan | ironfoot, So it looks like you are reading something like: submodules: { documentation/designdocument/cls: { url: http://github.com/Pelagicore/Pelagicore-LaTeX-Class.git } } right ? | 17:12 |
tristan | ironfoot, also, defs2bst expects to read the <target>.yml output of ybd (important detail in case you missed that) | 17:13 |
ironfoot | I'm using a yml file that ybd created in my definitions dir after using it | 17:13 |
tristan | right, not definitions.yml, but the other (recently created by ybd MR 300) | 17:14 |
ironfoot | and yes, that's the dict I'm trying to fetch | 17:14 |
ironfoot | hm.. right, I need to see that new yml file then | 17:14 |
tristan | so it looks right no ? with that return value, you should be able to iterate over submodules with node_items(returned_dict), which will return key & value: documentation/designdocument/cls, and a dict | 17:15 |
tristan | on *that* dict, you can call _yaml.node_get(the_submodule_dict, str, Symbol.URL) to get http://github.com/Pelagicore/Pelagicore-LaTeX-Class.git | 17:16 |
tristan | _yaml.node_get() is basically only about good error reporting | 17:16 |
tristan | and some type safety (conversions to string of things read as ints, like numerically declared branch names and suchlike) | 17:17 |
ironfoot | right, I expected node_get to return the type 'dict' as a plain python dict | 17:18 |
tristan | every dict loaded with the round trip loader is infact a CommentedMap yeah | 17:19 |
tristan | which is another collections.Mapping and compatible for dict-like purposes | 17:19 |
tristan | (while hiding some ruamelish stuff behind curtains) | 17:19 |
tristan | the _yaml.node_get() stuff could be improved by subclassing / extending CommentedMap, but eh, why do extra work | 17:20 |
tristan | s/could be improved/could be more elegant/ ... actually | 17:20 |
ironfoot | for now I don't care. This tool, defs2bst, doesn't have to be that nice/elegant | 17:23 |
tristan | no, and for BuildStream, I think it would make a nicer plugin author facing API if they could call node_get() as an api on the node itself; BUT | 17:45 |
tristan | I dont think I trust the ruamel maintainer enough to go subclassing CommentedMap | 17:45 |
tristan | it's unclear what API is stable and unstable, what guarantees there are, with current ruamel | 17:45 |
ironfoot | I have to stop for today, this is my WIP branch https://gitlab.com/palvarez89/defs2bst/tree/pedro/import-chunks | 17:46 |
ironfoot | probably not compatible with that new ybd yaml format, but I learnt that detail late today | 17:47 |
*** ssam2 has quit IRC | 18:03 | |
*** TingPing has left #buildstream | 18:21 | |
*** tristan has quit IRC | 22:29 |
Generated by irclog2html.py 2.14.0 by Marius Gedminas - find it at mg.pov.lt!