-
Notifications
You must be signed in to change notification settings - Fork 328
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
refactoring of jbake configuration #341
refactoring of jbake configuration #341
Conversation
Ok. I think I'm finished. |
Hello? Anybody out there? :) |
Still here.... just busy preparing for a talk at the moment :) |
All right. Just a ping. Worked obviously :) |
I haven't forgotten about this, I'll try and catch you on IRC to discuss what order is best to merge this and the other major PR's (such as the switch to Gradle). |
45199f9
to
a788ee1
Compare
a788ee1
to
3d55f33
Compare
Hmm...I'm rebasing from time to time and I ask my self if it would find a way earlier into master if I add deprecated versions of the old Method/Constructor signatures that changed during the refactoring? |
Thanks for rebasing this and keeping it up to date with master 👍 I've scheduled in a 2.7.0 release now so if you can add those deprecated methods/constructors for the build plugins (anything else as well?) I don't see why we can't include this in that release. What do you think? |
I'll try to keep it up to date. It would be nice to see this as soon as possible. But I'm not sure if it's possible to get a 100% compatible version. The FileUtil lost the public static I'll open a new branch for this experiment and concentrate on the main classes like
I touched 69 files. Ok...I can substract the tests but that will take some time. |
Ok. I created a new branch with restored methods and constructors. I tested the snapshot version against the gradle plugin and my website project and it still works. The CI failed a few times before, because the singleton ModelExtractors had registered engines from previous tests. So I had to implement a reset method to keep the tests clean and seperated from each other. I'm not quite sure if this is a problem for production too... |
I can test the branch against the Maven plugin as I've just published v0.2.0 if you want to see if there is any major problems? If not we can schedule it in for 2.7.0. |
That would be great. I will try to implement a test to verify we do not get problems with the singletons running bake in a loop removing document types. The only scenario I can think of at the moment. |
3d55f33
to
2e2b580
Compare
Rebased to master and squashed to make a review easier. |
2e2b580
to
55ac964
Compare
|
||
private void displayLegacyConfigFileWarningIfRequired() { | ||
LOGGER.warn("You have defined a part of your JBake configuration in {}", LEGACY_CONFIG_FILE); | ||
LOGGER.warn("Usage of this file is being deprecated, please rename this file to: {} to remove this warning", CONFIG_FILE); |
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.
Should we say that Usage of this file is deprecated and will be removed in JBake 3.0. Please rename this file to {}
?
Date date = df.parse((String) value); | ||
contents.put("date", date); | ||
} catch (ParseException e) { | ||
LOGGER.error("Unable to parse revdate. Expected {}", dateFormat, e); | ||
} | ||
} | ||
if (key.equals("jbake-tags")) { |
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.
Should we extract "jbake-tags" to a constant?
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.
Yes. There is a lot of stuff we should put into constants or find better substitutes.
I just wanted to focus on the configuration part with this PR.
189cbc3
to
301af6a
Compare
determine current sourcepath with user.dir system property
931d902
to
2486ab3
Compare
Shall we merge this before we merge smaller PR's like #471 ? |
Makes sense. That way we "just" need to adjust the outstanding PR's. |
Do you want to do the honours for this one? |
My pleasure! Do you need to prepare something before? Should I wait or just merge it right now? |
No I'm OK, go for it.
…On Mon, 13 Aug 2018, 1:36 pm Frank Becker, ***@***.***> wrote:
My pleasure! Do you need to prepare something before? Should I wait or
just merge it right now?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#341 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ABOcf8L6sZzmRvAaeVm0wVRhy6ARCU4zks5uQXK0gaJpZM4L714a>
.
|
a fragment of an not properly removed file during refactoring jbake-org#341 closes jbake-org#608
I started to refactor the configuration of jbake and it's components. See #340.
In general it's finished. But I want to write some more tests and add some logging in case options could not be found and things like that.
There are only two classes left with a direct dependency to a CompositeConfiguration, which are configuration specific classes.
Please take your time to review the changes. I hope you like it.