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

Add package in import when Scala 2.13 compiler gets confused #25368

Merged
merged 1 commit into from
Aug 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions admin/app/dfp/DataMapper.scala
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import dfp.ApiHelper.{isPageSkin, optJavaInt, toJodaTime, toSeq}
// These mapping functions use libraries that are only available in admin to create common DFP data models.
class DataMapper(
adUnitService: AdUnitService,
placementService: PlacementService,
customTargetingService: CustomTargetingService,
customFieldService: CustomFieldService,
placementService: dfp.PlacementService,
customTargetingService: dfp.CustomTargetingService,
customFieldService: dfp.CustomFieldService,
) {

def toGuAdUnit(dfpAdUnit: AdUnit): GuAdUnit = {
Expand Down
2 changes: 1 addition & 1 deletion applications/app/crosswords/CrosswordPage.scala
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class CrosswordPageWithContent(content: CrosswordContent) extends ContentPage {
override lazy val item = content
val crossword = content.crossword

import CrosswordSvg.{BorderSize, CellSize}
import crosswords.CrosswordSvg.{BorderSize, CellSize}

case class SvgDimensions(width: Int, height: Int) {
def styleString: String = s"width: $width; height: $height"
Expand Down
2 changes: 1 addition & 1 deletion common/app/model/content.scala
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ object Content {
val metadata = MetaData.make(fields, apiContent)
val elements = Elements.make(apiContent)
val tags = Tags.make(apiContent)
val commercial = Commercial.make(tags, apiContent)
val commercial = model.Commercial.make(tags, apiContent)
val trail = Trail.make(tags, fields, commercial, elements, metadata, apiContent)
val sharelinks = ShareLinks(tags, fields, metadata)
val atoms = Atoms.make(apiContent, sharelinks.pageShares)
Expand Down
4 changes: 2 additions & 2 deletions common/app/model/meta.scala
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ object MetaData {
webTitle: String,
url: Option[String] = None,
canonicalUrl: Option[String] = None,
pillar: Option[Pillar] = None,
pillar: Option[model.Pillar] = None,
format: Option[ContentFormat] = None,
designType: Option[DesignType] = None,
shouldGoogleIndex: Boolean = true,
Expand Down Expand Up @@ -313,7 +313,7 @@ case class MetaData(
url: String,
webUrl: String,
section: Option[SectionId],
pillar: Option[Pillar],
pillar: Option[model.Pillar],
format: Option[ContentFormat],
designType: Option[DesignType],
webTitle: String,
Expand Down
8 changes: 4 additions & 4 deletions common/test/model/ContentTest.scala
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class ContentTest
elements = Some(elements),
)

val trail: ContentType = Content(content)
val trail: model.ContentType = Content(content)

trail.fields.linkText should be("Some article")
trail.metadata.url should be("/foo/2012/jan/07/bar")
Expand Down Expand Up @@ -162,7 +162,7 @@ class ContentTest

it should "returns the correct shortUrlId (gu.com)" in {

def contentWithShortUrl(shortUrl: String): ContentType =
def contentWithShortUrl(shortUrl: String): model.ContentType =
Content(article.copy(fields = Some(ContentFields(shortUrl = Some(shortUrl)))))

contentWithShortUrl("http://gu.com/p/3r1b5").fields.shortUrlId should be("/p/3r1b5")
Expand All @@ -171,7 +171,7 @@ class ContentTest

it should "returns the correct shortUrlId (www.theguardian.com)" in {

def contentWithShortUrl(shortUrl: String): ContentType =
def contentWithShortUrl(shortUrl: String): model.ContentType =
Content(article.copy(fields = Some(ContentFields(shortUrl = Some(shortUrl)))))

contentWithShortUrl("http://www.theguardian.com/p/3r1b5").fields.shortUrlId should be("/p/3r1b5")
Expand Down Expand Up @@ -282,7 +282,7 @@ class ContentTest
contentType: String,
elements: List[ApiElement],
maybeByline: Option[String] = None,
): ContentType = {
): model.ContentType = {
Content(contentApi(contentType, elements, maybeByline))
}

Expand Down
2 changes: 1 addition & 1 deletion onward/app/controllers/TaggedContentController.scala
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class TaggedContentController(

private def render(trails: Seq[ContentType])(implicit request: RequestHeader): Result =
Cached(300) {
JsonComponent(
common.JsonComponent(
"trails" -> JsArray(trails.map { trail =>
Json.obj(
("webTitle", trail.metadata.webTitle),
Expand Down