moosetechnology / Famix

An abstract representation of source code. Famix is generic and can describe applications in multiple programming languages.
MIT License
12 stars 22 forks source link

Should FamixTFile be able to hold source text? #795

Open jecisc opened 1 week ago

jecisc commented 1 week ago

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:

What's your opinion on this?

NicolasAnquetil commented 1 week ago