-
Notifications
You must be signed in to change notification settings - Fork 129
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
WINDUP-253 Refactor WindupProcessor/Impl #228
Conversation
RecordingWindupProgressMonitor progressMonitor = new RecordingWindupProgressMonitor(); | ||
processor.execute(progressMonitor); |
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.
Where is the configuration passed to the processor?
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.
Ha! I wonder the tests passed without that :) Will fix.
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.
Done
@@ -14,12 +14,12 @@ | |||
public interface GraphConfigurationLoader | |||
{ | |||
/** | |||
* Loads all {@link Configuration}s from the system and returns the result. | |||
* Loads all OCP Rewrite's {@link Configuration}s from the system and returns the result. |
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.
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.
That's way better. I added "OCP Rewrite's" to make it clear what kind of configuration that is - because the term Configuration is a bit overloaded.
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.
Done
d70abb7
to
556e069
Compare
|
||
//<editor-fold defaultstate="collapsed" desc="get/set"> | ||
|
||
public Path getOutputDirectory() |
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.
Needs javadoc
556e069
to
c4293c7
Compare
Currently there's a problem: In tests, GraphContext gets initialized before WindupProcessor boots. So the graph is already located in some default location. Once again: I think we need a proper bootstrap. More that in an email. |
That only happens if you try to access the graph itself before setting the
|
c4293c7
to
f47fd06
Compare
… out and offload part of the code like prettyPrintRule() out of this important class.
needed by WINDUP-253 Refactor WindupProcessor/Impl
WINDUP-272 Refactor GraphContextFactoryImpl and GraphContextImpl - WIP WINDUP-253 Refactor WindupProcessor/Impl
…moved after development is done.
78b09f0
to
d2bdc43
Compare
Done, the tests pass. Rebasing after the dir structural change needs huge amout of work. I suggest rebasing that on top of this. |
…NDUP-253 Merging the rebase.
(22:17:01) Lincoln: ozizka: well, the code format (not a huge deal) (22:17:16) Lincoln: ozizka: there is also the strange relationship between WindupConfigurationModel and WindupConfig (22:17:55) Lincoln: There are a few places where exceptions are created and logged just to display a trace, which is pretty confusing imo (22:18:25) Lincoln: ozizka: the other issue for WINDUP-254 was included in this PR as well, and does not follow the solution we discussed afaik (22:19:09) Lincoln: ozizka: and I want to look deeper at the GraphContextImpl just to maybe make some tweaks because the relationship with that and the config seem a bit strange I'd suggest to merge to stick with the PR state, if you consider it a bit improvement. And I'll address this next (or later). |
|
||
//<editor-fold defaultstate="collapsed" desc="get/set"> | ||
|
||
public GraphLifecycleListener getGraphListener() |
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.
Needs javadoc
…nd a log message. GCI - don't use confusing new Exception() to get the stack trace. WindupProcessor - code format.
f56c36c
to
16e33ec
Compare
16e33ec
to
4b1516d
Compare
Following up on Ondra's email to windup-dev. Regarding the passing of variables to WindupConfigurationModel, I'd really love to see us choose one method of configuration over the other. This is perhaps a non-trivial problem because of our use of implicit initialization in many test-cases, but in the end it should be doable (and should be done, IMO) I'd like to look into how much work it would actually require to do in this PR, since I don't really like the idea of leaving this kind of refactoring half complete. What are your thoughts? |
I would prefer that we deal with the configuration issue in WINDUP-131. |
/** | ||
* Whether to log a WARNING when initializing the GraphContext lazily. | ||
*/ | ||
public boolean isWarnOnLazyInit() |
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.
These comments and method names do not appear to match the actual init code. It actually throws and Exception instead of warning.
Ok, just minor things remain at this point, IMO. It'd be nice if the commit were at least partially squashed too, IMO. |
Yeah, I'm not sure how easy it will be to squash this, but I agree it would be realllllly nice to do that. In fact, I think it's worth it, even if it's an hour of pain. |
cc94d8b
to
1dbc7e8
Compare
0dfb08c
to
b7157a0
Compare
Merged in: #251 |
#close WINDUPRULE-237
Refactor WindupProcessor/Impl to simplify the API, move inner classes out and offload part of the code like prettyPrintRule() out of this important class.