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

Check validity of target property descriptions #276

Open
2 of 5 tasks
lhstrh opened this issue Jul 8, 2024 · 2 comments
Open
2 of 5 tasks

Check validity of target property descriptions #276

lhstrh opened this issue Jul 8, 2024 · 2 comments
Assignees

Comments

@lhstrh
Copy link
Member

lhstrh commented Jul 8, 2024

@lhstrh lhstrh self-assigned this Jul 8, 2024
@chanijjani
Copy link
Contributor

chanijjani commented Jul 9, 2024

Rust validation (Please share any better method or suggestion with me!)

  • Example and method used
    : Run the binary of CounterProgram.lf after applying the target property and compiling with lfc-dev (version)
Target Property Supported (Web) Supported (Actual) Compilation & Execution Review Comment
auth, build, compiler, docker, files, no-runtime-validation, protobufs, runtime-version (Updated 11/20/2024) X X N/A None
buildtype O O O None
(Binary size: Debug=40,671,312bytes
Release=4,450,760bytes
RelWithDebInfo=27,350,408bytes
MinSizeRel=4,179,936bytes)
cargo-dependencies, fast, no-compile, single-threaded, timeout, workers O O O None
cargo-features O O O 1) The link command-line argument parsing doesn't work. (Updated 11/20/2024)
2) It would be good to add usage examples.
external-runtime-path O O X Not able to know how to use
export-dependency-graph O O O 1) This option works only when cargo-features is set to cli and the command line option --export-graph is given.
2) The graph file is generated in /tmp/reactors.dot.
3) The link cli doesn't work.
(Updated 11/20/2024)
logging no-compile (Updated 11/20/2024) X O O Check later
runtime-version X O X X Update needed (Updated 11/20/2024)
rust-include O O O The link Linking support files doesn't work.
scheduler O X X X Update needed (Updated 11/20/2024)
single-file-project O O O The link single-file project layout doesn't work. (Updated 11/20/2024)
Command-Line Arguments O O O 1) The link Logging levels doesn't work.
2) It seems this part needs to be moved under cargo-features. (Updated 11/20/2024)

@cmnrd cmnrd added this to the website cleanup milestone Jul 9, 2024
@vinzbarbuto
Copy link
Collaborator

Validity check for Python target properties

Methodology: A toy example was executed for each target property to verify successful program compilation and execution. The programs were compiled using lfc (version 0.8.0)

Unsupported Properties

Properties: auth, build, cargo-dependencies, cargo-features, compiler, external-runtime-path, export-dependency-graph, no-runtime-validation, runtime-version, rust-include, scheduler, single-file-project

Supported Properties

Overview

Target Property
Support (Web)
Support (Actual)
Comments
build 🟠 Review
build-type Update
docker It works
fast It works
files 🟠 Review
logging It works
no-compile It works
protobufs Suggestion
single-threaded It works
timeout It works
workers It works

Comments

build

Support:

  • Web:
  • Actual: 🟠

Review

The build property for the Python target is not supported according to the website documentation. However, when I set this property, it does compile the program without indicating that the property is unsupported. The issue arises when it struggles to resolve the path to the executable file. For instance, let's say I have a compile.sh script in the src/ directory. If I set:

target Python {
    build: "./compile.sh"
}

After compiling the program, I get the following error:

lfc: error: The command ./compile.sh could not be found in the current working directory or in your PATH.

Even when using the absolute path, I encounter the same error.

build-type

Support:

  • Web:
  • Actual:

Review

Althought the build-type property for the Python target is not supported according to the website documentation, I was able to compile and run an LF program with the Python target using this property. It accepts four different arguments: Debug, Release, RelWithDebInfo, and MinSizeRel. The default is Release.

files

Support:

  • Web:
  • Actual: 🟠

Review

The target property functions smoothly for regular LF programs. However, for federated LF programs, it requires absolute paths for included files; otherwise, compilation will fail. If using absolute paths is the intended approach, it should be clearly stated in the documentation.

Additionally, the website mistakenly displays both Python and C target examples. This seems to be an oversight.

protobufs

Support:

  • Web:
  • Actual:

Review

The target property works smoothly. However, I suggest improving the documentation on how to correctly install and set up protobuf on a local machine.

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

No branches or pull requests

4 participants