Skip to content
This repository has been archived by the owner on Jan 4, 2024. It is now read-only.

extra linebreaks are inserted randomly in verified code #15

Closed
prestwich opened this issue Sep 1, 2019 · 7 comments
Closed

extra linebreaks are inserted randomly in verified code #15

prestwich opened this issue Sep 1, 2019 · 7 comments
Labels
bug Something isn't working

Comments

@prestwich
Copy link

Verified code is here

Many extra line breaks are inserted throughout the verified code. Particularly between logical blocks

@rkalis
Copy link
Owner

rkalis commented Sep 9, 2019

Hmm yeah that's odd indeed. I'm thinking this might have something to do with sol-merger, which is the dependency that truffle-plugin-verify uses to flatten contract code. Any thoughts, @RyuuGan?

@RyuuGan
Copy link

RyuuGan commented Sep 9, 2019

@rkalis, @prestwich They are not randomly. Before there were comments, but since 1.0.0 comments are removed but instead empty lines are in their place.

@rkalis
Copy link
Owner

rkalis commented Sep 9, 2019

Ah that explains it. Is the deletion of comments intentional? If so, what's the rationale behind it?

@prestwich
Copy link
Author

why delete the text but leave the linebreak?

@RyuuGan
Copy link

RyuuGan commented Sep 9, 2019

@rkalis Deletion of comments was intentional, because I didn't want to write parser for comments.

@prestwich I use library that deletes comments, and it behaves likes like this. It removes only comments but blank lines with the spaces are left.

@prestwich
Copy link
Author

Okay, I will see if I can address this in the underlying library

@rkalis
Copy link
Owner

rkalis commented Jan 17, 2020

@RyuuGan added functionality to preserve comments in flattened code, which I enabled in truffle-plugin-verify@0.3.8. When using this version, all comments are preserved, and no random line breaks are inserted.

@rkalis rkalis closed this as completed Jan 17, 2020
@rkalis rkalis added the bug Something isn't working label May 7, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants