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

Improved target property descriptions for Python #291

Merged
merged 1 commit into from
Oct 29, 2024
Merged

Conversation

vinzbarbuto
Copy link
Collaborator

@vinzbarbuto vinzbarbuto commented Oct 29, 2024

This PR addresses part of issue #276 by validating target property descriptions to ensure accuracy and clarity.

@vinzbarbuto
Copy link
Collaborator Author

vinzbarbuto commented Oct 29, 2024

Validity Check for Python Target Property

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 Update
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:

Update

The build-type property for the Python target was previously undocumented on the website, but I successfully compiled and ran an LF program with this property. It accepts four arguments: Debug, Release (default), RelWithDebInfo, and MinSizeRel. I’ve updated the documentation to reflect this support.

files

Support:

  • Web:
  • Actual:

Review

The website incorrectly displayed examples for both Python and C targets. I have corrected this 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.

@lhstrh lhstrh changed the title Resolve issue #276: Validate target property descriptions Improved target property descriptions for Python Oct 29, 2024
@lhstrh lhstrh merged commit caf9ed8 into main Oct 29, 2024
2 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