Skip to content
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

Weird error after upgrade #6

Open
Aethelflaed opened this issue Dec 20, 2016 · 7 comments
Open

Weird error after upgrade #6

Aethelflaed opened this issue Dec 20, 2016 · 7 comments

Comments

@Aethelflaed
Copy link

Hi!
I'm using cells-erb on my project and I had a really strange error after upgrading it:

somewhere.erb:10: syntax error, unexpected keyword_end, expecting end-of-input end;end;end;end ^

I don't know where can this come from, as the line only has html on it. I saw many changes in cells-erb and erbse, so I decide to downgrade to 0.0.9 for the moment.

We're in a rush at the moment, but I'll try to provide a reproducible case next month.

@Guoxweii
Copy link

+1

@Startouf
Copy link

Startouf commented Aug 17, 2017

Cells-erb 0.1.0 has a very breaking change since it dropped support for #concat (so basically any rails tag helper will fail)

It should actually have been versionned 1.0.0 following semVer rules since this is quite a breaking change. I actually suggest rolling back to only have it in a major version number @apotonick

@apotonick
Copy link
Member

We don't use semver because it's fundamentally broken: once your library has a certain complexity you have to bump up the major version every other day, especially with a dynamic fuzzy language like Ruby that allows monkeypatching, no static typing ,etc. With this gem, we could've done that, though. 😉

We decided that with the new formular form render gem, we don't support the crappy Rails concat implementation anymore as it uses globals and it's impossible for us to integrate those while having a clean core implementation.

@apotonick
Copy link
Member

@Startouf Can you point me to some usages where 0.1.0 fails? The reason I ask is we use cells-erb 0.1.x in all kinds of projects, with and without Rails, and "it works™".

@Startouf
Copy link

Startouf commented Dec 20, 2017

Sorry didn't see that last message @apotonick only the one before.
Basically I was using a lot of bootstrap helpers that I was including in my cells, often bootstrap markup is quite long and several divs must be appended, so I was using very often the capture and concat helpers. And I was including those helpers both in my classic Rails views that I had not finished refactoring, and in cells views. With 0.1.0 all my views that were using bootstrap helpers just broke...that is to say pretty much everywhere

@codebycliff
Copy link

This version change also broke one of the applications we recently started maintaining. Even though you are of the opinion that semver is fundamentally broken (which ultimately I understand), you are still versioning your gems with the semver format. What was the point of bumping the minor version in this case if you are not using semver? I guess ultimately what I'm getting at is that the majority of users are going to see the semver format of versioning (i.e. x.x.x) and expect it to adhere to the standard. I would never expect an upgrade from 0.0.9 to 0.1.0 to break any of my applications. Just to be safe, I always check the changelog for breaking changes before I upgrade. At the very least, it should be called out as a "breaking change" in the changelog.

As far as the usage that caused the application to break, I am not entirely sure as we aren't the original authors and I'm not intimately familiar with this library. After an initial glance, I see two usages of capture and several usages of form helpers (e.g. select_tag, check_box_tag, etc.). If you would like more information, I would be happy to provide it.

@apotonick
Copy link
Member

@codebycliff I understand your confusion, but, frankly, we're talking about a gem here that doesn't even have a major release, yet. Wouldn't it be odd to release a 1.0.0 if you're not even happy with the 0.1.0 version, just to satisfy sem-ver (which I indeed do not believe in)?

Anyway, we've been using this gem in many Rails applications without any problems, since we do not use capture and helpers based on that method. The approach in those helpers has been a fundamental design flaw in Rails and has successfully prevented the introduction of real view components in Rails core, which, in turn, is why you guys are here ranting about Cells. 😬

I'm sorry if your application is broken now. I am wondering what is the problem, though, because ERBse has capture support (really cool capture support actually since it doesn't write to global variables) and I do not know about any problems with, say, check_box_tag etc. Maybe we could step-wise see what helpers need replacements in cells-erb? Would that work?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants