-
Notifications
You must be signed in to change notification settings - Fork 296
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
Parse error for clean code has returned version 2.1.1.2433 #3518
Comments
I just had a look at the log and it does not seem to be coming from version 2.1.1.2433 mentioned in the title. Are you sure that logging is enabled? It might have gotten disabled when switching to the new version. If it is disabled, the old log does not get cleared. |
So the first line of the log file being 2017-10-27 19:38:51.6171;TRACE-2.1.1.2433;Rubberduck.Common.LogLevelHelper; Doesn't reflect reality??? Looking at the log file this morning shows it has changed with the first line being |
Many apologies. Something must have gone wrong on my side when downloading the log file last night. Again, many apologies. The caching issue seems to be on my side. Now, I had a look at the log file you uploaded. Unfortunately, I cannot identify the issue from what has been logged. Would it be possible for you to provide the code that is at the place where the error is reported. (Please note that currently the reported position refers to the exported module/class. So the position will be offset by a few lines relative to the position in the code pane.) |
|
What constitutes "Clean Code"? I assume you did compile the vba code... Can you show us the lines around line 56 of the module |
Sorry for causing confusion. My use of clean code means that it compiles without error (not clean code as per Uncle Bob - although having watched some of his youtube videos recently that's now what I'm working towards) |
The code requested is attached Obviously all of the stuff before the option explicit is normally hidden in VBA Basically the code retrieves comma separated values that were previously stored in the document CustomXMLPart. captures any changes made by the user then saves the results back to customxmlparts for use elsewhere in the project. doc_xml is an object which provides a simplified api for reading and writing to the document CustomXMLParts |
Now I see what is going on here. The exported module text, which we parse to determine module and member attributes, which only show up in there, does not conform to how the VBE displays the code. More precisely, instead of This confuses our parser. Changing the parser to be able to deal with this will be a challange. |
@SteveLaycock Could you try whether the problem persists if you delete the content of the user form code behind, save, reinsert the content and save again? Since there are no member attributes in this form, this should not lead to a loss of information in the code behind. My hope is that removing and reinserting the code makes the VBE output the same code on export as can be seen in the code pane, apart from the attributes of course. |
MDoerner,Thanks for the suggestion. I did as you requested and was amused to find that the repasted code would not compile. The two lines
are incorrect as .Top and .Left do not take arguments. Now the code I posted has been running nicely, displaying the user form and returning the correct results but it appears that the text has been corrupted as there is a missing + after the .Top and .Left. The correct version of the code is
Unfortunately I'm still getting a parse error |
OK, with the I just tested it live in Excel and I can reproduce the issue. The problem seems to be our special export code for user forms, again: our export code removes the One of the last PRs has changed something there to fix another issue. |
I just looked it up: In UTF-7, the character So, the PR changing the encoding used in the special handling of the user forms caused this issue, indeed. |
Thanks for taking the time to investigate this issue. |
With the above version of Rubberduck I'm once again seeing Parse errors (Previous post was #2990).
RubberduckLog.txt
The text was updated successfully, but these errors were encountered: