IRC logs for #buildstream for Wednesday, 2017-02-15

*** ghishadow_ has joined #buildstream09:31
*** tristan has joined #buildstream09:37
*** ChanServ sets mode: +o tristan09:38
*** ssam2 has joined #buildstream10:09
*** ghishadow_ has quit IRC10:15
*** tristan has quit IRC11:58
*** csoriano has joined #buildstream12:15
*** tristan has joined #buildstream12:35
*** ChanServ sets mode: +o tristan12:36
*** tristan has quit IRC15:07
*** tristan has joined #buildstream15:46
ironfoottristan: am I right thinking that the case of "submodules" concept that baserock definitions has is still not supported in BuildStream?15:51
ironfootoh, no, it looks like it's is supported15:53
* ironfoot finds buildstream/plugins/sources/git.py docstring15:53
*** csoriano has left #buildstream16:25
tristanironfoot, 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
tristanironfoot, 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 Source16:33
tristani.e. recursive pipelines16:33
tristanI 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 pipelines16:34
tristanAlso, a project has it's own context of plugins for this reason (since plugins can be provided by users)16:34
tristanOhhh16:34
tristanironfoot, I totally just got excited and was talking about how projects can be modular and come together and totally missed your real question sorry :D16:35
tristanhah16:35
tristanyes, simple answer, submodules of a Git source itself are supported in the same way (with basically the same syntax)16:35
ironfoot:P16:36
ironfootI, of course, don't know all the implementation decisions for BuildStream yet16:37
tristanyeah 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
ironfootbut one day :)16:37
ironfootI'm just spending some time in defs2bst.py16:37
tristanIf you like, I put it up there in case you might want to yeah :)16:38
tristanthat's next on the list, since we have all the functionality we need to build a converted system16:38
tristanbeyond that; we needz Source implementations !16:38
tristanI find the docstrings are more easily readable... in the docs, fwiw: https://people.gnome.org/~tvb/buildstreamdocs/sources/git.html#module-git16:39
tristan:)16:39
ironfootthat's nice16:42
tristanbase format is entirely documented, each plugin is self documenting too :)16:45
tristanthe element plugins particularly, provide a .yaml file defining their defaults; which is just reused verbatim as documentation16:45
tristanironfoot, 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-distutils16:58
ironfootthanks for the heads up16:59
ironfootI'm at the moment stuck with the submodules dict16:59
ironfoot_yaml.py:node_get is not doing it right I think17:00
ironfoot`submodules = _yaml.node_get(node, dict, Symbol.SUBMOD, default_value={})` returns:17:03
ironfootCommentedMap([('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
tristanThat looks correct to me17:07
tristanCommentedMap is ruamel-foo for hiding details about roundtrip loading17:08
tristanAnd __bst_provenance_info is _yaml.PROVENANCE_KEY (which is ignored by node_items in defs2bst.py)17:09
tristanironfoot, 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
tristanironfoot, also, defs2bst expects to read the <target>.yml output of ybd (important detail in case you missed that)17:13
ironfootI'm using a yml file that ybd created in my definitions dir after using it17:13
tristanright, not definitions.yml, but the other (recently created by ybd MR 300)17:14
ironfootand yes, that's the dict I'm trying to fetch17:14
ironfoothm.. right, I need to see that new yml file then17:14
tristanso 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 dict17:15
tristanon *that* dict, you can call _yaml.node_get(the_submodule_dict, str, Symbol.URL) to get http://github.com/Pelagicore/Pelagicore-LaTeX-Class.git17:16
tristan_yaml.node_get() is basically only about good error reporting17:16
tristanand some type safety (conversions to string of things read as ints, like numerically declared branch names and suchlike)17:17
ironfootright, I expected node_get to return the type 'dict' as a plain python dict17:18
tristanevery dict loaded with the round trip loader is infact a CommentedMap yeah17:19
tristanwhich is another collections.Mapping and compatible for dict-like purposes17:19
tristan(while hiding some ruamelish stuff behind curtains)17:19
tristanthe _yaml.node_get() stuff could be improved by subclassing / extending CommentedMap, but eh, why do extra work17:20
tristans/could be improved/could be more elegant/  ... actually17:20
ironfootfor now I don't care. This tool, defs2bst, doesn't have to be that nice/elegant17:23
tristanno, 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; BUT17:45
tristanI dont think I trust the ruamel maintainer enough to go subclassing CommentedMap17:45
tristanit's unclear what API is stable and unstable, what guarantees there are, with current ruamel17:45
ironfootI have to stop for today, this is my WIP branch https://gitlab.com/palvarez89/defs2bst/tree/pedro/import-chunks17:46
ironfootprobably not compatible with that new ybd yaml format, but I learnt that detail late today17:47
*** ssam2 has quit IRC18:03
*** TingPing has left #buildstream18:21
*** tristan has quit IRC22:29

Generated by irclog2html.py 2.14.0 by Marius Gedminas - find it at mg.pov.lt!