Skip to content

Should FamixTFile be able to hold source text? #795

Open
@jecisc

Description

@jecisc

Currently FamixTFile allows one to set a source text saved in the state of the object instead of looking in a file.

We we ask the source text it will first check the state then read the file.

To me this is not the responsibility of FamixTFile and the only users of this are tests. We should adapt the tests to use real files IMO. But maybe we want to keep that in case we represent a file we cannot access on our disk?

If we wish to keep this feature, then we need to update it because currently it store the text in a flushable state. So we should store it in the attributes that are not flushable.

To resume:

  • Option 1: We cannot set the source text by hand and we need to read the file
  • Option 2: Make the source text an attribute and not a cache to not be able to lose this info

What's your opinion on this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions