From 943ad3120de611dcce2c8895a1b491cca32f87ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rados=C5=82aw=20Wa=C5=9Bko?= Date: Sat, 19 Jun 2021 14:41:55 +0200 Subject: [PATCH] Remove deprecated field as it should be added later once its design is refined --- docs/libraries/repositories.md | 5 ----- .../org/enso/editions/repository/Manifest.scala | 17 +++++++++++++++++ .../published/repository/LibraryManifest.scala | 4 ---- 3 files changed, 17 insertions(+), 9 deletions(-) create mode 100644 lib/scala/editions/src/main/scala/org/enso/editions/repository/Manifest.scala diff --git a/docs/libraries/repositories.md b/docs/libraries/repositories.md index 4f0b6f9c6bb7..b754a39c7f34 100644 --- a/docs/libraries/repositories.md +++ b/docs/libraries/repositories.md @@ -84,11 +84,6 @@ The manifest file is a YAML file with the following fields: - `dependencies` - a list of dependencies, as described below; - `description` - an optional description of the library that is displayed in the `info` and `search` command results; -- `deprecated` - an optional boolean flag describing if the library is - deprecated; if the library is marked as deprecated it will not show up in the - search results and it will be marked as such by the `info` command; the - Marketplace should not show the library as available to be installed, but if - the library was already added to a project, it will be downloaded nonetheless; - `tag-line` - an optional tagline that will be displayed in the marketplace interface. diff --git a/lib/scala/editions/src/main/scala/org/enso/editions/repository/Manifest.scala b/lib/scala/editions/src/main/scala/org/enso/editions/repository/Manifest.scala new file mode 100644 index 000000000000..f7a04e0b4ab7 --- /dev/null +++ b/lib/scala/editions/src/main/scala/org/enso/editions/repository/Manifest.scala @@ -0,0 +1,17 @@ +package org.enso.editions.repository + +import io.circe._ + +case class Manifest(editions: Seq[String]) + +object Manifest { + object Fields { + val editions = "editions" + } + + implicit val decoder: Decoder[Manifest] = { json => + for { + editions <- json.get[Seq[String]](Fields.editions) + } yield Manifest(editions) + } +} diff --git a/lib/scala/library-manager/src/main/scala/org/enso/librarymanager/published/repository/LibraryManifest.scala b/lib/scala/library-manager/src/main/scala/org/enso/librarymanager/published/repository/LibraryManifest.scala index ff167ed9235e..4b589d7532d6 100644 --- a/lib/scala/library-manager/src/main/scala/org/enso/librarymanager/published/repository/LibraryManifest.scala +++ b/lib/scala/library-manager/src/main/scala/org/enso/librarymanager/published/repository/LibraryManifest.scala @@ -6,7 +6,6 @@ import org.enso.editions.LibraryName case class LibraryManifest( archives: Seq[String], dependencies: Seq[LibraryName], - deprecated: Boolean, tagLine: Option[String], description: Option[String] ) @@ -15,7 +14,6 @@ object LibraryManifest { object Fields { val archives = "archives" val dependencies = "dependencies" - val deprecated = "deprecated" val tagLine = "tag-line" val description = "description" } @@ -26,13 +24,11 @@ object LibraryManifest { dependencies <- json.getOrElse[Seq[LibraryName]](Fields.dependencies)( Seq() ) - deprecated <- json.getOrElse[Boolean](Fields.deprecated)(false) tagLine <- json.get[Option[String]](Fields.tagLine) description <- json.get[Option[String]](Fields.description) } yield LibraryManifest( archives = archives, dependencies = dependencies, - deprecated = deprecated, tagLine = tagLine, description = description )