Skip to content

Commit

Permalink
Library Downloads MVP (#1885)
Browse files Browse the repository at this point in the history
  • Loading branch information
radeusgd authored Jul 22, 2021
1 parent 980ba8c commit f3bc88b
Show file tree
Hide file tree
Showing 125 changed files with 1,903 additions and 649 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/scala.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ env:
sbtVersion: 1.5.2
# Please ensure that this is in sync with rustVersion in build.sbt
rustToolchain: nightly-2021-05-12
# Some moderately recent version of Node.JS is needed to run the library download tests.
nodeVersion: 12.18.4

jobs:
test_and_publish:
Expand Down Expand Up @@ -80,6 +82,15 @@ jobs:
graalvm-version: ${{ env.graalVersion }}
java-version: ${{ env.javaVersion }}
native-image: true
- name: Install Node
uses: actions/setup-node@v1
with:
node-version: ${{ env.nodeVersion }}
- name: Install Dependencies of the Simple Library Server
shell: bash
working-directory: tools/simple-library-server
run: |
npm install
- name: Set Up SBT
shell: bash
run: |
Expand Down
6 changes: 6 additions & 0 deletions RELEASES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Enso Next

## Tooling

- Implement a basic library downloader
([#1885](https://github.com/enso-org/enso/pull/1885)), allowing to download
missing libraries.

## Libraries

- Added support for reading XLS and XLSX spreadsheets
Expand Down
45 changes: 41 additions & 4 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -236,16 +236,20 @@ lazy val enso = (project in file("."))
`task-progress-notifications`,
`logging-utils`,
`logging-service`,
`logging-truffle-connector`,
`locking-test-helper`,
`akka-native`,
`version-output`,
`engine-runner`,
runtime,
searcher,
launcher,
downloader,
`runtime-version-manager`,
`runtime-version-manager-test`,
editions,
`distribution-manager`,
`edition-updater`,
`library-manager`,
syntax.jvm,
testkit
Expand Down Expand Up @@ -710,9 +714,10 @@ lazy val cli = project
.configs(Test)
.settings(
version := "0.1",
libraryDependencies ++= Seq(
"org.scalatest" %% "scalatest" % scalatestVersion % Test,
"org.typelevel" %% "cats-core" % catsVersion
libraryDependencies ++= circe ++ Seq(
"com.typesafe.scala-logging" %% "scala-logging" % scalaLoggingVersion,
"org.scalatest" %% "scalatest" % scalatestVersion % Test,
"org.typelevel" %% "cats-core" % catsVersion
),
Test / parallelExecution := false
)
Expand Down Expand Up @@ -875,6 +880,7 @@ lazy val testkit = project
.settings(
libraryDependencies ++= Seq(
"org.apache.commons" % "commons-lang3" % commonsLangVersion,
"commons-io" % "commons-io" % commonsIoVersion,
"org.scalatest" %% "scalatest" % scalatestVersion
)
)
Expand Down Expand Up @@ -1337,6 +1343,7 @@ lazy val `distribution-manager` = project
)
)
.dependsOn(editions)
.dependsOn(cli)
.dependsOn(pkg)
.dependsOn(`logging-utils`)

Expand All @@ -1354,11 +1361,38 @@ lazy val editions = project
)
.dependsOn(testkit % Test)

lazy val downloader = (project in file("lib/scala/downloader"))
.settings(
version := "0.1",
libraryDependencies ++= circe ++ Seq(
"com.typesafe.scala-logging" %% "scala-logging" % scalaLoggingVersion,
"commons-io" % "commons-io" % commonsIoVersion,
"org.apache.commons" % "commons-compress" % commonsCompressVersion,
"org.scalatest" %% "scalatest" % scalatestVersion % Test,
akkaActor,
akkaStream,
akkaHttp,
akkaSLF4J
)
)
.dependsOn(cli)

lazy val `edition-updater` = project
.in(file("lib/scala/edition-updater"))
.configs(Test)
.settings(
libraryDependencies ++= Seq(
"com.typesafe.scala-logging" %% "scala-logging" % scalaLoggingVersion,
"org.scalatest" %% "scalatest" % scalatestVersion % Test
)
)
.dependsOn(editions)
.dependsOn(downloader)

lazy val `library-manager` = project
.in(file("lib/scala/library-manager"))
.configs(Test)
.settings(
resolvers += Resolver.bintrayRepo("gn0s1s", "releases"),
libraryDependencies ++= Seq(
"com.typesafe.scala-logging" %% "scala-logging" % scalaLoggingVersion,
"org.scalatest" %% "scalatest" % scalatestVersion % Test
Expand All @@ -1368,7 +1402,9 @@ lazy val `library-manager` = project
.dependsOn(editions)
.dependsOn(cli)
.dependsOn(`distribution-manager`)
.dependsOn(downloader)
.dependsOn(testkit % Test)
.dependsOn(`logging-service` % Test)

lazy val `runtime-version-manager` = project
.in(file("lib/scala/runtime-version-manager"))
Expand All @@ -1385,6 +1421,7 @@ lazy val `runtime-version-manager` = project
)
)
.dependsOn(pkg)
.dependsOn(downloader)
.dependsOn(`logging-service`)
.dependsOn(cli)
.dependsOn(`version-output`)
Expand Down
20 changes: 10 additions & 10 deletions distribution/engine/THIRD-PARTY/NOTICE
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ The license information can be found along with the copyright notices.
Copyright notices related to this dependency can be found in the directory `com.lihaoyi.sourcecode_2.13-0.2.1`.


'commons-compress', licensed under the Apache License, Version 2.0, is distributed with the engine.
The license file can be found at `licenses/APACHE2.0`.
Copyright notices related to this dependency can be found in the directory `org.apache.commons.commons-compress-1.20`.


'checker-qual', licensed under the The MIT License, is distributed with the engine.
The license information can be found along with the copyright notices.
Copyright notices related to this dependency can be found in the directory `org.checkerframework.checker-qual-2.11.1`.
Expand Down Expand Up @@ -96,11 +101,6 @@ The license file can be found at `licenses/APACHE2.0`.
Copyright notices related to this dependency can be found in the directory `com.fasterxml.jackson.core.jackson-core-2.11.1`.


'config', licensed under the Apache License, Version 2.0, is distributed with the engine.
The license file can be found at `licenses/APACHE2.0`.
Copyright notices related to this dependency can be found in the directory `com.typesafe.config-1.3.2`.


'zio_2.13', licensed under the Apache-2.0, is distributed with the engine.
The license file can be found at `licenses/APACHE2.0`.
Copyright notices related to this dependency can be found in the directory `dev.zio.zio_2.13-1.0.1`.
Expand Down Expand Up @@ -161,11 +161,6 @@ The license file can be found at `licenses/APACHE2.0`.
Copyright notices related to this dependency can be found in the directory `org.scala-lang.scala-compiler-2.13.6`.


'reactive-streams', licensed under the CC0, is distributed with the engine.
The license file can be found at `licenses/CC0`.
Copyright notices related to this dependency can be found in the directory `org.reactivestreams.reactive-streams-1.0.2`.


'config', licensed under the Apache-2.0, is distributed with the engine.
The license file can be found at `licenses/APACHE2.0`.
Copyright notices related to this dependency can be found in the directory `com.typesafe.config-1.4.1`.
Expand Down Expand Up @@ -206,6 +201,11 @@ The license information can be found along with the copyright notices.
Copyright notices related to this dependency can be found in the directory `org.typelevel.jawn-parser_2.13-1.0.0`.


'config', licensed under the Apache-2.0, is distributed with the engine.
The license file can be found at `licenses/APACHE2.0`.
Copyright notices related to this dependency can be found in the directory `com.typesafe.config-1.4.0`.


'circe-literal_2.13', licensed under the Apache 2.0, is distributed with the engine.
The license file can be found at `licenses/APACHE2.0`.
Copyright notices related to this dependency can be found in the directory `io.circe.circe-literal_2.13-0.14.0-M1`.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
/*
* Copyright 2013 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
*/

/*
* Copyright 2008 Google LLC
*
Expand All @@ -14,20 +28,6 @@
* limitations under the License.
*/

/*
* Copyright 2013 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
*/

/*
* Copyright 2008 Google LLC
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
*/

/*
* Copyright 2014 The Error Prone Authors.
* Copyright 2017 The Error Prone Authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -47,7 +47,7 @@
*/

/*
* Copyright 2017 The Error Prone Authors.
* Copyright 2014 The Error Prone Authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* Copyright (C) 2009-2020 Lightbend Inc. <https://www.lightbend.com>
* Copyright (C) 2017-2020 Lightbend Inc. <https://www.lightbend.com>
*/

/*
* Copyright (C) 2017-2020 Lightbend Inc. <https://www.lightbend.com>
* Copyright (C) 2009-2020 Lightbend Inc. <https://www.lightbend.com>
*/
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
* limitations under the License.
*/

Copyright 2017-2019 John A. De Goes and the ZIO Contributors

/*
* Copyright 2017-2020 John A. De Goes and the ZIO Contributors
* Copyright 2017-2018 Łukasz Biały, Paul Chiusano, Michael Pilquist,
Expand All @@ -36,3 +34,5 @@ Copyright 2017-2019 John A. De Goes and the ZIO Contributors
* See the License for the specific language governing permissions and
* limitations under the License.
*/

Copyright 2017-2019 John A. De Goes and the ZIO Contributors
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2011,2012 Mathias Doenitz, Johannes Rudolph
* Copyright (C) 2011 Mathias Doenitz
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -15,7 +15,7 @@
*/

/*
* Copyright (C) 2011 Mathias Doenitz
* Copyright (C) 2011,2012 Mathias Doenitz, Johannes Rudolph
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
Apache Commons Compress
Copyright 2002-2020 The Apache Software Foundation

This product includes software developed at
The Apache Software Foundation (https://www.apache.org/).

---

The files in the package org.apache.commons.compress.archivers.sevenz
were derived from the LZMA SDK, version 9.20 (C/ and CPP/7zip/),
which has been placed in the public domain:

"LZMA SDK is placed in the public domain." (http://www.7-zip.org/sdk.html)

---

The test file lbzip2_32767.bz2 has been copied from libbzip2's source
repository:

This program, "bzip2", the associated library "libbzip2", and all
documentation, are copyright (C) 1996-2019 Julian R Seward. All
rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:

1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.

2. The origin of this software must not be misrepresented; you must
not claim that you wrote the original software. If you use this
software in a product, an acknowledgment in the product
documentation would be appreciated but is not required.

3. Altered source versions must be plainly marked as such, and must
not be misrepresented as being the original software.

4. The name of the author may not be used to endorse or promote
products derived from this software without specific prior written
permission.

THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Julian Seward, [email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* Some portions of this file Copyright (c) 2004-2006 Intel Corportation
* and licensed under the BSD license.
*/

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

/* Copyright (c) 2008 Google Inc.

// Copyright 2003-2010 Christian d'Heureuse, Inventec Informatik AG, Zurich, Switzerland
// www.source-code.biz, www.inventec.ch/chdh

/* Copyright (c) 2008 Google Inc.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

/* Copyright (c) 2008 Google Inc.

// Copyright 2003-2010 Christian d'Heureuse, Inventec Informatik AG, Zurich, Switzerland
// www.source-code.biz, www.inventec.ch/chdh

/* Copyright (c) 2008 Google Inc.
Loading

0 comments on commit f3bc88b

Please sign in to comment.