Repository navigation
Conversation
|
@tgjones could you please have a look at this? This PR introduces very small changes to many files, so it is very prone to having merge conflicts. The sooner you can merge it (that is if you decide to do so), the less conflicts there will be. |
|
@rdumont This is a tough one. Firstly, I do like these changes - introducing a non-global API is definitely the direction I want to go in with DotLiquid. And I appreciate the amount of work you put it in to prepare this pull request. But... I was planning to move to a non-global API (only, without the existing global API) as part of v2.0, and the new major version number would allow it to be backwards-incompatible (with appropriate documentation for helping users move from v1.x to v2.0). Being free from backwards-compatibility concerns would help with the refactoring. My preference is to break it good, and make these changes as part of a wider refactoring that will become v2.0. That said, I think this pull request could be a good starting point, so I'm going to leave it open for now, and possibly merge it in when I start working on v2.0 (your I'm aware I haven't been able to put much time into DotLiquid in recent months, but I'm hoping that will change in the near future. I notice that at least one of your commits (770c228) is for a different issue, please could you open a new pull request for that one? |
|
(Apart from a non-global API, the other big feature I want to do in v2.0 is a proper parser, instead of the current regex-based one. Something similar-ish to Shopify/liquid#235) |
|
@tgjones thanks for the reply! I'm really happy to know that you are thinking of this new major and what you said makes total sense. This feature will be better off in it. You can count me in too to help with the job of making 2.0. The new parser idea is also very good. I will open another PR for the tests correction ASAP! |
|
Great, thank you - once I've got a clearer idea of how (and when) to proceed with v2.0, I'll try to create some sort of plan so that those who are interested can tackle discrete bits of work. |
|
@tgjones Any update on the plan for v2.0? |
|
I'm feeling a lot of open source guilt about DotLiquid v2 - and DotLiquid in general. On the one hand, I haven't used DotLiquid myself for a long time. I've been steadily answering StackOverflow questions about DotLiquid, answering (usually belatedly, admittedly) questions on the Google Group, reviewing pull requests and bug fixes, and doing a few releases on NuGet. That is neither more nor less than what I should do, as the project owner / maintainer. But aside from the satisfaction of running a reasonably successful OSS project, there isn't a great deal of upside for me - I no longer use DotLiquid myself. And it takes a lot longer to answer questions and fix bugs than people might imagine :) On the other hand, I do have a vision for DotLiquid's future, some of which I outlined above. I want to keep DotLiquid's core strengths intact - safe by default, well tested, and trusted by its users - while moving to a more modern API based around a proper compiler and non-static configuration. But I'm coming to the conclusion that I'm not going to be able to invest the time to do that work myself. One possible route forward is:
It's difficult to consider giving up control, because... well, I'm a bit of a control freak. But I also want to see DotLiquid thrive, so I think this is a necessary direction to go in. I'd be grateful if people would weigh in here with their opinions about this. |
|
Count me in, but only if you maintain control. Thanks! AP On Mon, Dec 15, 2014 at 3:38 PM, Tim Jones [email protected] wrote:
|
|
Awesome, thanks Alessandro. I guess the first step is to move the dotliquid repo to the dotliquid organisation. From what I've read here, the best option is to transfer ownership from the formosatek organisation to the dotliquid organisation. That way, GitHub will redirect git requests. Anyone have any experience with doing that? Does that sound like a sensible approach? |
|
@tgjones I would love to get my hands dirty and help with the 2.0 release. Guidance and feature requests are all very welcome so we can make this happen. I also agree that moving to the https://github.com/dotliquid organisation would be the best direction to take. You can count me in! |
|
Yes Tim, the most appropriate way is to transfer ownership between AP On Tue, Dec 16, 2014 at 4:53 PM, Tim Jones [email protected] wrote:
|
|
Thank you Rodrigo - that's great! I'll move the repo now, fingers crossed... |
|
Done - looks okay to me. The HTTP redirect is working. I haven't tested the Git redirect, but presumably that's working too. Welcome to your new home, dotliquid... |
|
Count me in! I'd be happy to help with version 2.0. |
|
Thank you, Mathieu, that's great! In the meantime, there are a number of open issues and pull requests that shouldn't be breaking changes, and can be pulled into 1.x. I won't pollute this pull request anymore; let's move the discussion to Gitter: Thanks!
|
|
Closing due to lack of activity. |
|
This never got in, right? Because I'd like to see something like it and I'm happy to implement it. |
|
@axm Correct, feel free to have a go at it |
|
@haf All right |
Fixes #93. This is what I got:
Before
After
The global methods were all kept so that it doesn't break the interface. Also, the syntax for each configuration was kept the same (including overloads), except for being on the
TemplateConfigurationinstance.I ran performance tests and no difference was detected on the time taken to run all the tests. Is this good to go?
Motivation
In case anyone fails to understand the importance of this feature, here is my real-world scenario.
1. Support different schemas: I have different schemas of my application running at the same time on the same application. Each schema supports completely different structures for the entities and have tags with different behaviors, although both run on DotLiquid. Therefore, I need to be able to conditionally use a different DotLiquid configuration for each schema.
2. Validation: My application supports editing entities through a REST API, so I need to validate their contents so that they don't break at run time. I've found that the best way to do this is by registering fake tags that, instead of fully running their production code, just verify the integrity of their contents and configuration.
3. Testing: I don't want my unit tests to depend on a global, static, configuration. If I am testing a class, the test configuration should be as isolated and as close to my tests as possible.