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

Convert Bloom to es6 class #428

Merged
merged 3 commits into from Jan 29, 2019
Merged

Convert Bloom to es6 class #428

merged 3 commits into from Jan 29, 2019

Conversation

s1na
Copy link
Contributor

@s1na s1na commented Jan 29, 2019

Converts Bloom to an es6 class, and moves it to a directory to have it as a separate module.

My thinking is to structure the VM as multiple modules which contain most of the code, and in the root directory (lib/) have code that connects these individual modules together. This should also ease our way into a monorepo (if we decided to go for it). Bloom was a low-hanging fruit, I'll create an issue to discuss how to structure the rest of the code.

Bloom is used only internally, and is not exposed, so this shouldn't be a breaking change.

@holgerd77
Copy link
Member

The bloom file here is also showing as deleted + new file, can you change that for review? If you did renaming via git maybe you have to do it in two steps like:

  1. bloom.js-> bloom/bloom.js
  2. bloom/bloom.js -> bloom/index.js

? Just an idea, have absolutely no confirmation if this would work better.

@holgerd77
Copy link
Member

(and if so probably accompanied by two separate renaming commits for GitHub to process)

@coveralls
Copy link

coveralls commented Jan 29, 2019

Coverage Status

Coverage decreased (-0.03%) to 90.987% when pulling c71fcae on refactor/bloom-es6 into f154d2c on master.

@s1na
Copy link
Contributor Author

s1na commented Jan 29, 2019

Yeah this is a big issue, I have to find a fix. Maybe I'm doing something wrong in my work flow. I re-worked the commit history and even though the first commit clearly shows this is only a rename, but it's still being shown as a removed file and an added file... Should I do it in two PRs?

@holgerd77
Copy link
Member

Can/did you try to do it in two steps like I suggested above and do one commit per step (so first commit just for directory move, second commit for file renaming)? Maybe this becomes easier for GitHub to process?

@holgerd77
Copy link
Member

Found this similar problem description gogs/gogs#5056.

Also points in the direction that the suggestion above could eventually fix this.

@s1na
Copy link
Contributor Author

s1na commented Jan 29, 2019

It is detecting the rename in the first commit, I think it's the large (relative to the file itself) diff that causes it to treat it as a deleted+new file across commits. Created #429 to break it into two PRs.

Signed-off-by: Sina Mahmoodi <itz.s1na@gmail.com>
Signed-off-by: Sina Mahmoodi <itz.s1na@gmail.com>
Signed-off-by: Sina Mahmoodi <itz.s1na@gmail.com>
@holgerd77
Copy link
Member

Ok, have reviewed and merged.

Copy link
Member

@holgerd77 holgerd77 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

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

Successfully merging this pull request may close these issues.

None yet

4 participants