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

Fix #391: Scala.js library dependencies #392

Merged
merged 1 commit into from
Nov 12, 2020

Conversation

adpi2
Copy link
Contributor

@adpi2 adpi2 commented Nov 12, 2020

Fixes #391

Using the %%% operator, the Scala.js dependencies are correctly resolved.

> fetchJS / dependencyTree
[warn] There may be incompatibilities among your library dependencies; run 'evicted' to see detailed eviction warnings.
[info] com.47deg:fetch_sjs1_2.13:1.3.1+45-a6ae8ad4-SNAPSHOT [S]
[info]   +-org.scala-js:scalajs-library_2.13:1.3.0 [S]
[info]   +-org.typelevel:cats-effect_sjs1_2.13:2.2.0 [S]
[info]     +-org.scala-js:scalajs-library_2.13:1.1.1 (evicted by: 1.3.0)
[info]     +-org.scala-js:scalajs-library_2.13:1.3.0 [S]
[info]     +-org.typelevel:cats-core_sjs1_2.13:2.2.0 [S]
[info]       +-org.scala-js:scalajs-library_2.13:1.1.1 (evicted by: 1.3.0)
[info]       +-org.scala-js:scalajs-library_2.13:1.3.0 [S]
[info]       +-org.typelevel:cats-kernel_sjs1_2.13:2.2.0 [S]
[info]         +-org.scala-js:scalajs-library_2.13:1.1.1 (evicted by: 1.3.0)
[info]         +-org.scala-js:scalajs-library_2.13:1.3.0 [S]
[info]         
[info] fetchJS / dependencyTree completed

The code can be linked by the Scala.js linker, and so the tests can be executed:

> fetchJS / test
[info] FetchAsyncQueryTests:
[info] - We can interpret an async fetch into an IO
[info] - We can combine several async data sources and interpret a fetch into an IO
[info] - We can use combinators in a for comprehension and interpret a fetch from async sources into an IO
[info] - We can use combinators and multiple sources in a for comprehension and interpret a fetch from async sources into an IO
[info] FetchSpec:
[info] FetchSyntaxTests:
[info] - `fetch` syntax allows lifting of any value to the context of a fetch
[info] - `fetch` syntax allows lifting of any `Throwable` as a failure on a fetch
[info] FetchReportingTests:
[info] - Plain values have no rounds of execution
[info] - Single fetches are executed in one round
[info] - Single fetches are executed in one round per binding in a for comprehension
[info] - Single fetches for different data sources are executed in multiple rounds if they are in a for comprehension
[info] - Single fetches combined with cartesian are run in one round
[info] - Single fetches combined with traverse are run in one round
[info] - The product of two fetches from the same data source implies batching
[info] - The product of concurrent fetches of the same type implies everything fetched in batches
[info] FetchTests:
[info] - We can lift plain values to Fetch
[info] - We can lift values which have a Data Source to Fetch
[info] - We can map over Fetch values
[info] - We can use fetch inside a for comprehension
[info] - We can mix data sources
[info] - We can use Fetch as a cartesian
[info] - We can use Fetch as an applicative
[info] - We can traverse over a list with a Fetch for each element
[info] - We can depend on previous computations of Fetch values
[info] - We can collect a list of Fetch into one
[info] - We can collect a list of Fetches with heterogeneous sources
[info] - We can collect the results of a traversal
[info] - Monadic bind implies sequential execution
[info] - Traversals are implicitly batched
[info] - Sequencing is implicitly batched
[info] - Identities are deduped when batched
[info] - The product of two fetches implies parallel fetching
[info] - Concurrent fetching calls batches only when it can
[info] - Concurrent fetching performs requests to multiple data sources in parallel
[info] - The product of concurrent fetches implies everything fetched concurrently
[info] - The product of concurrent fetches of the same type implies everything fetched in a single batch
[info] - Every level of joined concurrent fetches is combined and batched
[info] - Every level of sequenced concurrent fetches is batched
[info] - The product of two fetches from the same data source implies batching
[info] - Sequenced fetches are run concurrently
[info] - Sequenced fetches are deduped
[info] - Traversals are batched
[info] - Duplicated sources are only fetched once
[info] - Sources that can be fetched concurrently inside a for comprehension will be
[info] - Pure Fetches allow to explore further in the Fetch
[info] - Elements are cached and thus not fetched more than once
[info] - Batched elements are cached and thus not fetched more than once
[info] - Elements that are cached won't be fetched
[info] - Fetch#run accepts a cache as the second (optional) parameter
[info] - Fetch#runCache accepts a cache as the second (optional) parameter
[info] - Fetch#runCache works without the optional cache parameter
[info] - We can use a custom cache that discards elements
[info] - We can use a custom cache that discards elements together with concurrent fetches
[info] - Data sources with errors throw fetch failures
[info] - Data sources with errors throw fetch failures that can be handled
[info] - Data sources with errors won't fail if they're cached
[info] - We can lift errors to Fetch
[info] - We can lift handle and recover from errors in Fetch
[info] - If a fetch fails in the left hand of a product the product will fail
[info] - If a fetch fails in the right hand of a product the product will fail
[info] - If there is a missing identity in the left hand of a product the product will fail
[info] - If there is a missing identity in the right hand of a product the product will fail
[info] - If there are multiple failing identities the fetch will fail
[info] - We can run optional fetches
[info] - We can run optional fetches with traverse
[info] - We can run optional fetches with other data sources
[info] - We can make fetches that depend on optional fetch results when they aren't defined
[info] - We can make fetches that depend on optional fetch results when they are defined
[info] - We can lift IO actions into Fetch
[info] - A failed IO action lifted into Fetch will cause a Fetch to fail
[info] - A IO action can be combined with data fetches
[info] - We can lift Concurrent actions into Fetch
[info] - A failed Concurrent action lifted into Fetch will cause a Fetch to fail
[info] - A Concurrent action can be combined with data fetches
[info] FetchBatchingTests:
[info] - A large fetch to a datasource with a maximum batch size is split and executed in sequence
[info] - A large fetch to a datasource with a maximum batch size is split and executed in parallel
[info] - Fetches to datasources with a maximum batch size should be split and executed in parallel and sequentially when using productR
[info] - Fetches to datasources with a maximum batch size should be split and executed in parallel and sequentially when using productL
[info] - A large (many) fetch to a datasource with a maximum batch size is split and executed in sequence
[info] - A large (many) fetch to a datasource with a maximum batch size is split and executed in parallel
[info] - Very deep fetches don't overflow stack or heap
[info] Run completed in 1 second, 445 milliseconds.
[info] Total number of tests run: 80
[info] Suites: completed 6, aborted 0
[info] Tests: succeeded 80, failed 0, canceled 0, ignored 0, pending 0
[info] All tests passed.
[info] fetchJS / test completed

@codecov
Copy link

codecov bot commented Nov 12, 2020

Codecov Report

Merging #392 (a6ae8ad) into master (b82a1d6) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #392   +/-   ##
=======================================
  Coverage   67.55%   67.55%           
=======================================
  Files           8        8           
  Lines         299      299           
  Branches        5        5           
=======================================
  Hits          202      202           
  Misses         97       97           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b82a1d6...a6ae8ad. Read the comment docs.

Copy link
Contributor

@BenFradet BenFradet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you 👍

@BenFradet BenFradet merged commit b1797c3 into xebia-functional:master Nov 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Wrong library dependency configuration for Scala.js
2 participants