Skip to content

Commit

Permalink
Remove deprecated field as it should be added later once its design i…
Browse files Browse the repository at this point in the history
…s refined
  • Loading branch information
radeusgd committed Jun 22, 2021
1 parent 7c1d0f3 commit 943ad31
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 9 deletions.
5 changes: 0 additions & 5 deletions docs/libraries/repositories.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
Original file line number Diff line number Diff line change
@@ -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)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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]
)
Expand All @@ -15,7 +14,6 @@ object LibraryManifest {
object Fields {
val archives = "archives"
val dependencies = "dependencies"
val deprecated = "deprecated"
val tagLine = "tag-line"
val description = "description"
}
Expand All @@ -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
)
Expand Down

0 comments on commit 943ad31

Please sign in to comment.