-
Notifications
You must be signed in to change notification settings - Fork 7
Project Builder API #1780
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
base: main
Are you sure you want to change the base?
Project Builder API #1780
Conversation
This crude prototype can be executed via: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I really like the basic structure :)
return this; | ||
} | ||
|
||
public setEngine(engine : 'tree-sitter' | 'r-shell') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be the KnownParser
type which... Should be renamed to known engine :p
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So we want to have an extra field for the engine that has precedence over the options?
It gets a bit confusing when doing something like this:
await new FlowrAnalyzerBuilder(require("x <- 1"))
.setEngine(new RShell())
.amendConfig(c => {
c.defaultEngine = 'tree-sitter'
return c;
}).build();
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correction: Take name
property from KnownParser
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
amendConfig
should accept a function that can return FlowrConfigOptions | void
.
Disabling the eslint warning is fine
src/project/flowr-analyzer.ts
Outdated
this.parser = parser; | ||
} | ||
|
||
public async dataflow() : Promise<PipelineOutput<typeof DEFAULT_DATAFLOW_PIPELINE>> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using default data flow pipeline here is... Wrong in general we should select the type based on the engine :D in general we maybe want to embed a cache?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in general we maybe want to embed a cache?
Yes, I think that would make sense. We need to have the dataflow analysis results for the query execution anyways. In theory, the slicing pipeline could re-use the dataflow step results, but I'm not sure whether we should enable this right now
No description provided.