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

Formatter fix to not fail when encountering an invalid symlink. #6172

Merged
merged 5 commits into from
Apr 5, 2023

Conversation

mwu-tow
Copy link
Contributor

@mwu-tow mwu-tow commented Apr 2, 2023

Pull Request Description

Recently I was getting failures when running ./run fmt. This was caused by a symlink leading to a non-existent file under some of the node directories. This PR addresses this issue,

Important Notes

Checklist

Please ensure that the following checklist has been satisfied before submitting the PR:

  • The documentation has been updated, if necessary.
  • Screenshots/screencasts have been attached, if there are any visual changes. For interactive or animated visual changes, a screencast is preferred.
  • All code follows the
    Scala,
    Java,
    and
    Rust
    style guides. In case you are using a language not listed above, follow the Rust style guide.
  • All code has been tested:
    • Unit tests have been written where possible.
    • If GUI codebase was changed, the GUI was tested when built using ./run ide build.

@mwu-tow mwu-tow marked this pull request as ready for review April 2, 2023 21:46
@mwu-tow mwu-tow added the -build-script Category: build script label Apr 3, 2023
@mwu-tow mwu-tow self-assigned this Apr 3, 2023
@mwu-tow mwu-tow added the CI: No changelog needed Do not require a changelog entry for this PR. label Apr 3, 2023
@mwu-tow mwu-tow requested review from wdanilo, kazcw and farmaazon and removed request for kazcw April 5, 2023 12:15
pub fn discover_paths_internal(
vec: &mut Vec<RustSourcePath>,
path: impl AsRef<Path>,
is_main_dir: bool,
) -> Result {
use ide_ci::fs;
let path = path.as_ref();
let md = fs::metadata(path)?;
// Below we use `symlink_metadata` instead of `metadata` because the latter follows symlinks.
// We don't want the formatter to fail if it encounters a symlink to a non-existing file.
Copy link
Contributor

Choose a reason for hiding this comment

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

Extra space.

@mwu-tow mwu-tow merged commit 43eb4c6 into develop Apr 5, 2023
@mwu-tow mwu-tow deleted the wip/mwu/fix-formatter branch April 5, 2023 23:52
Procrat added a commit that referenced this pull request Apr 6, 2023
* develop:
  Project Sharing (#6077)
  Adjust `{Table|Column}.parse` to use `Value_Type` (#6213)
  Add cloud endpoints for frontend (#6002)
  Implement `Table.union` for Database backend (#6204)
  Batch insert suggestions (#6189)
  Formatter fix to not fail when encountering an invalid symlink. (#6172)
  Suspended atom fields are evaluated only once (#6151)
  Text.to_display_text is (shortened) identity (#6174)
  Engine benchmark visualization tool can compare two bench runs (#6198)
  Add PRIVATE so function hidden from Component Browser and other tidying... (#6207)
  Hotfix for #6203. (#6210)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
-build-script Category: build script CI: No changelog needed Do not require a changelog entry for this PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants