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

Only filter files in directories starting with . #16784

Merged
merged 7 commits into from
Sep 22, 2023

Conversation

jellespijker
Copy link
Member

@jellespijker jellespijker commented Sep 21, 2023

Description

Mac builds were missing some definitions, which happened because there was
a . in the directory. The reason why we filtered these in the first place
was because Apple doesn't notarize/sign an App correctly if the directory
starts with a . e.q.: .dylibs in scipy and shapely.

Renamed the resources folder containing a . with an _

Added a new diagnostic check to the printer-linter which will diagnose if the directory contains a .

Diagnostics:
-   DiagnosticMessage:
        FileOffset: 1
        FilePath: ./ultimaker/Cura/resources/quality/strateo3d/Standard_0.4/s3d_std0.4_ABS-X_A.inst.cfg
        Message: 'Directory name containing a `.` not allowed .cfg, rename directory containing this file e.q: `_`'
        Replacements: []
    DiagnosticName: diagnostic-resources-macos-app-directory-name
    Level: Error

Fixes #16007

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Printer definition file(s)
  • Translations

How Has This Been Tested?

  • Created a build: See GH run (to be added)

Test Configuration:

  • Operating System: MacOS ARM64

Checklist:

jellespijker and others added 3 commits September 21, 2023 15:54
Mac builds were missing some definitions, which happened because there was
a . in the directory. The reason why we filtered these in the first place
was because Apple doesn't notarize/sign an App correctly if the directory
starts with a . e.q.: .dylibs in scipy and shapely.

Made the filtering less aggressive

Contributes to CURA-11014
@saumyaj3
Copy link
Contributor

Folder names in the quality folder renaming done so that in mac while building it doesn't skip adding it to the package.
It was seen that folders that contain "." in their name were skipped.

A new Linter subclass - 'Directory' has been created and integrated into the linting process to handle directory naming conventions, specifically for MacOS. MacOS has issues when signing and notarizing directories with '.' in their names. The new class will trigger an 'Error' level diagnostic if this convention is violated. The linter will become a required check with this update, as its new check configuration was added to '.printer-linter'. The version number in 'pyproject.toml' was also incremented to reflect these changes.

Contributes to CURA-11014
yield Diagnostic(
file = self._file,
diagnostic_name = "diagnostic-resources-macos-app-directory-name",
message = f"Directory name containing a `.` not allowed {self._file.suffix}, rename directory containing this file e.q: `_`",
Copy link
Member

Choose a reason for hiding this comment

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

We should maybe mention that this is specifically for MacOS. Less questions from implementers that way ;-)

Copy link
Member

@rburema rburema left a comment

Choose a reason for hiding this comment

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

LGTM, good work Jelle & Saumya.

@rburema rburema merged commit a278ad0 into 5.5 Sep 22, 2023
5 checks passed
@rburema rburema deleted the CURA-11014_fix_missing_definitions branch September 22, 2023 09:30
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.

3 participants