Skip to content

[Generator artifacts] inherit attribute for generated files #315

@ameltalbi

Description

@ameltalbi

The Problem To Be Solved

The principle of read-only “Generator artifacts” is that generated code is fully managed by the generator, so that generated files are in read-only mode access (earased and regenerated from scratch when regenerate).
Nevertheless, we need to consider the case of generated files that need to be modified by user to manage its application part, like “generated user templates”
==> Generator artifacts could be also modifiable (same as configuration file)

The need is to be able to tag modifiable generated files.

Accordingly we need to introduce a mechanism so that attributes are inherited to generated file (generated based on a "genAsset" file).

Suggest A Solution

Add a new child element named "inherited" to be added to <file> with attribute "category" set to genAsset from where generated file will inherit attributes defined inside.

example:

<file category="genAsset" name=".config/template/compX/app_init_template" attr="modifiable">
	<inherited attr="modifiable" category="source"/>
</file>

these attributes should be then transferred as attributes of the generated file inside the .GPDSC (similar solution will be also needed for .cgen.yml option)

<file category="source" attr="modifiable" name="app_init.c" />

Metadata

Metadata

Assignees

No one assigned

    Labels

    In DiscussionDiscussion for this issue is open and ongoingProposalIssue that contains a proposal for change of specification

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions