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

Support trailing single line comments #63

Closed
flyway opened this Issue Jun 25, 2013 · 12 comments

Comments

Projects
None yet
3 participants
@ghost
Copy link
Collaborator

ghost commented Jun 25, 2013

@ghost

This comment has been minimized.

Copy link
Collaborator Author

ghost commented Jun 25, 2013

From business.axelfontaine.eu@googlemail.com on November 22, 2010 17:52:18
Hello Daniel,

Flyway's sql parser currently only supports single line comments that span the whole line (not trailing behind some other statement, or part of a statement).

As a workaround you can move your comment to the previous line. This will work and won't trip the parser.

I renamed this issue to reflect the missing parser feature. It is non-trivial to implement correctly though. MySQL supports both single and double quotes to delimit strings literals. These delimiters can then be escaped in various ways (double quote or preceding backslash). A potential implementation for this will need to carefully track all these things.

Can you let me know if this workaround worked for you?

If so, I'll update the documentation to make this limition clearer.

How critical are trailing single line comments for you?

Cheers,
Axel

@ghost

This comment has been minimized.

Copy link
Collaborator Author

ghost commented Jun 25, 2013

From dan...@danielgarcia.info on November 23, 2010 01:13:56
The workaround works for me.

Is there some documentation describing the work flow for developing flyway? I'd like to contribute changes to the parser. Moreover, is there a mailing list for this project?

Thanks,
Daniel

@ghost

This comment has been minimized.

Copy link
Collaborator Author

ghost commented Jun 25, 2013

From dan...@danielgarcia.info on November 23, 2010 01:18:49
Another behavior that I mentioned in the initial report was the stripping of new lines. This part if very important to me. Without new lines in stored procedure definitions, the stored procedures are unreadable.

Thanks,
Daniel

@ghost

This comment has been minimized.

Copy link
Collaborator Author

ghost commented Jun 25, 2013

From business.axelfontaine.eu@googlemail.com on November 23, 2010 10:43:09
Hi Daniel,

I've logged a separate issue for the newlines: http://code.google.com/p/flyway/issues/detail?id=65

Cheers,
Axel

@ghost

This comment has been minimized.

Copy link
Collaborator Author

ghost commented Jun 25, 2013

From business.axelfontaine.eu@googlemail.com on November 23, 2010 10:47:56
Hi Daniel,

I've logged 2 more issues for the

Cheers,
Axel

@ghost

This comment has been minimized.

Copy link
Collaborator Author

ghost commented Jun 25, 2013

From axel.fontaine.business@gmail.com on February 19, 2011 19:47:16
This issue was closed by revision 98c7b490b5.

@ghost

This comment has been minimized.

Copy link
Collaborator Author

ghost commented Jun 25, 2013

From axel.fontaine.business@gmail.com on February 19, 2011 19:50:27
From the looks of it, this has been fixed automatically as part of the fix for issue #65 (preserving new lines). I've expanded the test suite to verify this.

@ghost

This comment has been minimized.

Copy link
Collaborator Author

ghost commented Jun 25, 2013

From axel.fontaine.business@gmail.com on February 19, 2011 19:57:10
Better late than never: I've added you to the contributors list of Flyway for the patch you provided.

@ghost

This comment has been minimized.

Copy link
Collaborator Author

ghost commented Jun 25, 2013

From axel.fontaine.business@gmail.com on March 14, 2013 10:47:39
This problem seems to have resurfaced (see test case in issue #428).

@gemisigo

This comment has been minimized.

Copy link

gemisigo commented Aug 30, 2018

Hi Axel,

What's the ETA for 5.2.0? Seeing that this issue has been dragging since 3.1, I guess it's not that important since it has a relatively easy workaround. What would you estimate the odds of it being fixed in 5.2.0?

@gemisigo

This comment has been minimized.

Copy link

gemisigo commented Sep 4, 2018

Ohh, I see. So this is gonna linger for a while...

@axelfontaine

This comment has been minimized.

Copy link
Contributor

axelfontaine commented Feb 7, 2019

Fixed. At last!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.