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

Propagates imports instead of cloning dependent messages #75

Merged
merged 2 commits into from
Mar 18, 2019

Conversation

rafaparadela
Copy link
Member

@rafaparadela rafaparadela commented Mar 18, 2019

This PR closes #74

In summary:

If we have author.proto:

package com.acme;

message Author {
    string name = 1;
    string nick = 2;
}

and a book.proto:

package com.acme;

import "author.proto";

message Book {
    int64 isbn = 1;
    string title = 2;
    repeated Author author = 3;
}

If we try to produce the scala code given the book.proto

What we had previously

We are generating code like this:

package com.acme

object book {
  @message final case class Author(name: String, nick: String)
  @message final case class Book(isbn: Long, title: String, author: List[Author])
}

What we have now

We are generating code like this:

package com.acme

import com.acme.author.Author

object book {
  @message final case class Book(isbn: Long, title: String, author: List[Author])
}

@codecov
Copy link

codecov bot commented Mar 18, 2019

Codecov Report

Merging #75 into master will increase coverage by 0.61%.
The diff coverage is 90.47%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #75      +/-   ##
==========================================
+ Coverage   53.12%   53.73%   +0.61%     
==========================================
  Files          17       17              
  Lines         753      763      +10     
  Branches        4        3       -1     
==========================================
+ Hits          400      410      +10     
  Misses        353      353
Impacted Files Coverage Δ
...ain/scala/higherkindness/skeuomorph/mu/print.scala 82.6% <100%> (+1.96%) ⬆️
...igherkindness/skeuomorph/protobuf/ParseProto.scala 89.04% <100%> (ø) ⬆️
.../scala/higherkindness/skeuomorph/mu/protocol.scala 52% <60%> (+2%) ⬆️
...la/higherkindness/skeuomorph/protobuf/schema.scala 90.78% <0%> (+1.31%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c0dbc1f...7a2783c. Read the comment docs.

@rafaparadela rafaparadela merged commit ca35e4c into master Mar 18, 2019
@rafaparadela rafaparadela deleted the feature/74-not-merging-dependents branch March 18, 2019 21:47
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

Successfully merging this pull request may close these issues.

Stop merging dependent messages from imports
2 participants