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

More robust dev scripts and removed util directory #1995

Merged
merged 3 commits into from
Sep 8, 2023
Merged

More robust dev scripts and removed util directory #1995

merged 3 commits into from
Sep 8, 2023

Conversation

cmnrd
Copy link
Collaborator

@cmnrd cmnrd commented Sep 8, 2023

This PR removes the util directory. By removing the utli directory, I hope to reduce the incentive on dumping unfurnished code and experimental tools in the main LF repo.

The only content of util at the moment are the launch helper scripts. This PR removes the launch scripts and instead implements the logic directly in the lf*-dev scripts. This adds a bit of code duplication (the readlink logic), but also simplifies other aspects of the script. Overall, the new solution should be more robust.

This PR also adds back the capability to run the lf*-dev scripts from anywhere in the filesystem. This was removed by #1988.

Finally, this PR also fixes bugs in the way we handled scripts before.

@cmnrd cmnrd requested review from axmmisaka and lhstrh September 8, 2023 10:44
@cmnrd
Copy link
Collaborator Author

cmnrd commented Sep 8, 2023

It also turns out that there was a major bug in the readlink logic. I honestly don't know why this passed tests before.

Edit: Actually, I do know: The tests passed before because both the launch scripts and the link structure crated in cli-test is 2 levels deep. It resolved the wrong path, but the end result was correct coincidentally...

@cmnrd cmnrd changed the title Removed util directory and dev scripts can be executed from anywhere More robust dev scripts and removed util directory Sep 8, 2023
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.

Modulo a minor comment about the tests, this looks like the right solution to me.

@lhstrh
Copy link
Member

lhstrh commented Sep 8, 2023

It also turns out that there was a major bug in the readlink logic. I honestly don't know why this passed tests before.

Edit: Actually, I do know: The tests passed before because both the launch scripts and the link structure crated in cli-test is 2 levels deep. It resolved the wrong path, but the end result was correct coincidentally...

😮 🤯

@cmnrd cmnrd added this pull request to the merge queue Sep 8, 2023
Merged via the queue into master with commit f1921bc Sep 8, 2023
@cmnrd cmnrd deleted the no-util branch September 8, 2023 18:58
@lhstrh lhstrh added the refactoring Code quality enhancement label Sep 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactoring Code quality enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants