foundweekends / foundweekends/giter8
Maven property resolves to a stale version
- Dominant language
- Scala
- Stars
- 1.8k
- Forks
- 225
- Avg merge
- 2h 35m
- Merged PRs (30d)
- 8
Description
## steps
Issue detected on https://github.com/scalacenter/scalafix.g8/pull/100
- sbt 1.9.0
- sbt-giter8 0.16.2
## problem
```scala
➜ amm
Loading...
Welcome to the Ammonite Repl 2.5.2 (Scala 2.13.8 Java 11.0.19)
@ import $ivy.`org.foundweekends.giter8::giter8:0.16.2`
import $ivy.$
@ giter8.Maven.lookup((("scalafix_version", "maven(ch.epfl.scala, sbt-scalafix)")) :: Nil)
res1: Either[String, giter8.G8.OrderedProperties] = Right(value = List(("scalafix_version", "0.10.4")))
```
## expectation
```diff
-res1: Either[String, giter8.G8.OrderedProperties] = Right(value = List(("scalafix_version", "0.10.4")))
+res1: Either[String, giter8.G8.OrderedProperties] = Right(value = List(("scalafix_version", "0.11.0")))
```
since sbt-scalafix 0.11.0 is on Maven central:
- https://repo1.maven.org/maven2/ch/epfl/scala/sbt-scalafix_2.12_1.0/0.11.0/sbt-scalafix-0.11.0.pom
- https://repo1.maven.org/maven2/ch/epfl/scala/sbt-scalafix_2.12_1.0/maven-metadata.xml
## notes
The problem seems to come from [the REST API used to lookup the latest artifact](https://github.com/foundweekends/giter8/blob/63ec56f739622d626b34a47ec8ad4a562368870e/library/src/main/scala/giter8/MavenHelper.scala#L24C1-L39), as https://search.maven.org/solrsearch/select?q=g:%22ch.epfl.scala%22+AND+a:%22sbt-scalafix%22&rows=10&wt=xml returns stale results as of June 8th (5 days after the missing artifact was published).
```
0
3
g:"ch.epfl.scala" AND a:"sbt-scalafix"
off
true
id,g,a,latestVersion,p,ec,repositoryId,text,timestamp,versionCount
5
score desc,timestamp desc,g asc,a asc
10
xml
2.2
sbt-scalafix
.pom
.jar
ch.epfl.scala
ch.epfl.scala:sbt-scalafix724599971
0.10.4
jar
central
ch.epfl.scala
sbt-scalafix
.pom
.jar
1665436577000
72
sbt-scalafix
.jar
.pom
ch.epfl.scala
ch.epfl.scala:sbt-scalafix-1555225206
0.9.29
jar
central
ch.epfl.scala
sbt-scalafix
.jar
.pom
1622413366000
88
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.