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

Build deps and project manifest #908

Merged
merged 1 commit into from
Aug 10, 2023
Merged

Conversation

g-r-a-n-t
Copy link
Member

@g-r-a-n-t g-r-a-n-t commented Jul 27, 2023

What was wrong?

There is currently no way to include libraries other than the std lib in a Fe project.

example:

my_project
├── fe.toml
└── src
    └── main.fe
# fe.toml
name = "my_project"
version = "0.1.0"

[dependencies]
my_lib = "../my_lib"

To-Do

  • OPTIONAL: Update Spec if applicable
  • Add entry to the release notes (may forgo for trivial changes)
  • Clean up commit history

@g-r-a-n-t g-r-a-n-t marked this pull request as draft July 27, 2023 05:30
@g-r-a-n-t g-r-a-n-t changed the title Build deps Build deps and manifest Jul 28, 2023
@g-r-a-n-t g-r-a-n-t changed the title Build deps and manifest Build deps and project manifest Jul 28, 2023
crates/analyzer/src/namespace/items.rs Outdated Show resolved Hide resolved
crates/analyzer/src/namespace/items.rs Outdated Show resolved Hide resolved
})
.collect();

for (project_path, project_files) in &build_files.project_files {
Copy link
Member Author

Choose a reason for hiding this comment

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

add comments to this fn

crates/analyzer/tests/analysis.rs Outdated Show resolved Hide resolved
crates/analyzer/tests/analysis.rs Outdated Show resolved Hide resolved
crates/common/src/utils/files.rs Outdated Show resolved Hide resolved
crates/common/src/utils/files.rs Outdated Show resolved Hide resolved
crates/common/src/utils/files.rs Outdated Show resolved Hide resolved
crates/fe/src/template/src/main.fe Show resolved Hide resolved
my_project/fe.toml Outdated Show resolved Hide resolved
crates/common/src/utils/files.rs Outdated Show resolved Hide resolved
vec![]
};

let src_path = Path::new(path)
Copy link
Member Author

Choose a reason for hiding this comment

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

create handy fn for these annoying path conversions

crates/fe/todo Outdated Show resolved Hide resolved
crates/analyzer/tests/errors.rs Outdated Show resolved Hide resolved
@g-r-a-n-t g-r-a-n-t marked this pull request as ready for review August 8, 2023 23:06
Copy link
Collaborator

@cburgdorf cburgdorf left a comment

Choose a reason for hiding this comment

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

Dope! I think this looks good 👍

Fs,
}

impl FileLoader {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nitpick: Comments for public functions

- A `src` directory containing two .fe files. These files show how one can import other modules and how to write tests.
- A `fe.toml` manifest with basic project info and some local project imports.

There are two project modes, they are main and lib. Main projects can import libraries and have code output. Libraries on the other hand cannot import main projects and do not have code outputs.
Copy link
Collaborator

Choose a reason for hiding this comment

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

nitpick: should put main and lib in backticks here imho

@cburgdorf cburgdorf merged commit c898e68 into ethereum:master Aug 10, 2023
7 checks passed
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.

2 participants