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

Define Editions Configuration #1769

Closed
11 tasks done
radeusgd opened this issue May 29, 2021 · 2 comments · Fixed by #1797
Closed
11 tasks done

Define Editions Configuration #1769

radeusgd opened this issue May 29, 2021 · 2 comments · Fixed by #1797
Assignees
Labels
--breaking Important: a change that will break a public API or user-facing behaviour -tooling Category: tooling p-high Should be completed in the next sprint

Comments

@radeusgd
Copy link
Member

radeusgd commented May 29, 2021

Summary

We introduce the concept of editions and this task encompasses the related code that needs to be added to handle loading and using editions.

Value

  • Editions can be used in the projects.

Specification

  • Refine the design of the Edition file-format and document it.
    • The edition should include the engine version that is related to that edition and a list of available libraries along with their versions.
    • An edition may derive another edition - it then inherits all of its parent's settings but any settings set within the edition override what was inherited. The inheritance can be arbitrarily nested.
    • It can prefer-local-libraries.
    • Refer to a special local repository which points to the local libraries directory.
      • It should be configurable via an ENSO_LOCAL_LIBRARIES_DIR env var.
      • By default it should be ~/enso/libraries (or the equivalent for other OSes).
  • Implement a parser for the edition file format and a system for loading editions from predefined localizations, including being able to load nested derived definitions.
    • The nested editions should be accessed using an EditionProvider.
    • The loader must correctly handle inheritance cycles (producing an error instead of entering an infinite loop).
  • Implement an EditionProvider that gets a list of paths to the edition storage.
  • Implement an EditionProvider that uses the DistributionManager to get the paths.
    • DistributionManager should be able to override the local and downloaded library paths based on environment variable.
  • Implement a LibraryResolver that gets a path to the remote library storage and to local libraries.
    • Implement the logic which can load the edition by name and then resolve library versions.
      • libraryName -> Either[LibraryVersionResolutionError, LibraryVersion]
    • This may also be the right place to include the library path resolution logic.
      • (libraryName, libraryVersion) -> Either[LibraryPathResolutionError, Path]
  • Update the Package Config to include the edition configuration and infer the engine version based on that.

Acceptance Criteria & Test Cases

  • The above specification is completed.
  • The edition file format is documented.
  • Edition parsing together with loading derived editions and cycle avoidance are unit tested.
  • The core logic for library resolution is tested.
@radeusgd radeusgd added Category: Libraries -tooling Category: tooling p-high Should be completed in the next sprint labels May 29, 2021
This was referenced May 29, 2021
@radeusgd
Copy link
Member Author

Related discussion at #1771 (comment)

@radeusgd radeusgd self-assigned this Jun 4, 2021
@radeusgd radeusgd added --breaking Important: a change that will break a public API or user-facing behaviour and removed Change: Non-Breaking labels Jun 10, 2021
@radeusgd
Copy link
Member Author

Note: this will include a breaking change of the package file format. The engine-version field will now be inside of the edition section and will be optional (as it can be defined in a parent edition).

@radeusgd radeusgd mentioned this issue Jun 11, 2021
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
--breaking Important: a change that will break a public API or user-facing behaviour -tooling Category: tooling p-high Should be completed in the next sprint
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant