-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Decouple responsibilities of Source class #185
Comments
I am currently working on cleanup of The builder will not use any caching - e.g. your point 2 will be satisfied. I find the description of point 1 a little bit too vague (unless it means "set the URI for a Source") - hard to guess whether my work satisfies it. |
To give some more background, I replaced 1 and 2 with my own code because:
To satisfy these requirements, I currently do the following: I do my own loading/caching, exclusively use The following enhancements to
I also considered proposing a first-class, user-extensible notion of source origin, but this might not work so well in a polyglot setting. |
After jtulach@872a1e9 the origin is taken uniformly, I'd say. The additional meta-information is out of scope for the current "builder" change, but it is an interesting idea. Similar to: when a co-located source is about to be loaded (think of |
…/truffle:sl_new_dsl_layout to master * commit '2339890855bdafdccc589c7ae2fd9786308c5504': Add type system reference SLForeignToSLTypeNode to make it use the new layout. Use new DSL layout for SimpleLanguage. Deprecate DSLMetadata and remove it from the generator code.
Looks like a stale issue where most issues are already resolved. Please reopen if addition work is necessary. |
Currently,
Source
has at least three distinct responsibilities:SourceSection
, etc.)I'm happy with how
Source
handles 3, but have different requirements for 1 and 2 (i.e. I need full control over them). Can these responsibilities be extracted into separate classes (e.g.SourceLoader
) that are not mandatory for using thePolyglotEngine
/TruffleLanguage
/Source
APIs? Also, can you add a way to set the URI for a(ny)Source
, so that its origin can be cleanly attached?The text was updated successfully, but these errors were encountered: