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

Dependency Management #46

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

tanneberger
Copy link
Member

@tanneberger tanneberger commented Dec 15, 2023

Lingua-Franca Dependencies

graph TD;
    S1[[Lockfile Exists?]];
    S2[[Read Lockfile]];
    
    S3[[Iteratively Pull Dependencies]];
    S4[[Read Version Requirements]];
    S5[[Read Package Version]];
    S6[[Read Package Dependencies]];
    S7[[Select Packages based on Version Requirements]];
    S8[[Create Lockfile]];
    S9[[create lfc_include directory from Lockfile]];
    S10[[Call Backend -Start LFC]];
    S11[[Inherit and merge Target Properties]]
    
    S1-->S2;
    S1-->S3;
    S3-->S4;
    S4-->S5;
    S5-->S6;
    S6-->S3;
    S3-->S7;
    S7-->S8;
    S8-->S9;
    S2-->S9;
    S9-->S10;
    S10-->S11;
Loading

Explanation

File structure

./Lingo.toml
./src
./build
    ./libraries
        ./0ba957161fb429f610a42e881678a5bef797b138 (hash calculated from package sources)
            ./Lingo.toml
            ./src
        ./1618817019dab848783e80a2779eee1a4f57516
            ./Lingo.toml
            ./src
    ./lfc_include (we tell lfc to include files from this directory)
        ./lf-websockets
            ./Lingo.toml
            ./src
        ./requests
            ./Lingo.toml
            ./src

The version resolvement process

Requirements: [">=1.2", "<=1.5", "<=2.0", ">=1.3.2"]
Sources: [("1.1.0", "github..."), ("1.6.90", "tarball...."),("1.4.6", "path...."), ("1.4.9", "github...")]

  • select a "good" package that full fills all the requirements.
  • this selection is documented in the Lingo.lock

@tanneberger tanneberger added the enhancement New feature or request label Dec 15, 2023
@tanneberger tanneberger self-assigned this Dec 15, 2023
@tanneberger tanneberger force-pushed the feature/init-dependency-management branch from 0783433 to b39abd0 Compare June 2, 2024 21:34
@tanneberger tanneberger changed the title [DRAFT] First Steps into Dependency Management Direction Dependency Management Sep 20, 2024
@tanneberger tanneberger force-pushed the feature/init-dependency-management branch from 2f28b63 to 008f402 Compare September 20, 2024 22:56
- fetching packages
- libraries specification
- add backend for the C target
- lock files
@tanneberger
Copy link
Member Author

@oowekyala would you mind having a look at this PR? - Thank You

@tanneberger tanneberger force-pushed the feature/init-dependency-management branch from ad490f7 to 93d6095 Compare September 30, 2024 06:23
Cargo.toml Show resolved Hide resolved
derivation.nix Outdated Show resolved Hide resolved
Copy link
Member

@lhstrh lhstrh left a comment

Choose a reason for hiding this comment

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

Left some comments...

src/args.rs Outdated Show resolved Hide resolved
src/args.rs Show resolved Hide resolved
src/package/mod.rs Show resolved Hide resolved
pub const LIBRARY_DIRECTORY: &str = "libraries";

/// default folder for lf executable files
const DEFAULT_EXECUTABLE_FOLDER: &str = "src";
Copy link
Member

Choose a reason for hiding this comment

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

This seems odd.

Copy link
Member Author

Choose a reason for hiding this comment

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

this variable is just used for the init command to check if a src folder already exists.

Copy link
Member

Choose a reason for hiding this comment

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

Isn't the variable misnamed then?

Copy link
Member Author

Choose a reason for hiding this comment

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

You mean because src/lib is inside src ?

src/package/mod.rs Outdated Show resolved Hide resolved
src/package/mod.rs Show resolved Hide resolved
@tanneberger tanneberger force-pushed the feature/init-dependency-management branch from 93d6095 to 05edd2e Compare September 30, 2024 22:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants