Skip to content

Rework cs.files, cs.configs and cs.modules #164

@fgyanz

Description

@fgyanz

Hi team,

Quoting @vmezzela comment:

My only concern is related to the cs.configs and cs.files field. These are becoming more than just normal fields in the Codestream object. Furthermore, they contain overlapping data.

cs.configs : {'CONFIG_SUSE_KERNEL': {'x86_64': 'y', 's390x': 'y'}}
cs.files : {'fs/namespace.c': {'conf': 'CONFIG_SUSE_KERNEL', 'module': 'vmlinux', 'symbols': ['clone_private_mount']}}

I think we can merge these two fields.
What do you think about creating a new class for this purpose?

In this way we avoid having objects that are nested dictionaries, and it would be more clear (by reading the code) what the field contains.

I agree with the underlying issue, and the above information can probably be presented in a more approachable manner. Special care has to be taken to avoid bugs, since this data structures are used in several places throughout the codebase and for different purposes. Most importantly, at the lowest level they still need to be compatible with json.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions