Skip to content

feat(cli): UTExportedTypeDeclarations support for file associations#22

Open
tomerqodo wants to merge 2 commits intoaugment_combined_20260121_augment_sentry_coderabbit_1_base_featcli_utexportedtypedeclarations_support_for_file_associations_pr166from
augment_combined_20260121_augment_sentry_coderabbit_1_head_featcli_utexportedtypedeclarations_support_for_file_associations_pr166
Open

feat(cli): UTExportedTypeDeclarations support for file associations#22
tomerqodo wants to merge 2 commits intoaugment_combined_20260121_augment_sentry_coderabbit_1_base_featcli_utexportedtypedeclarations_support_for_file_associations_pr166from
augment_combined_20260121_augment_sentry_coderabbit_1_head_featcli_utexportedtypedeclarations_support_for_file_associations_pr166

Conversation

@tomerqodo
Copy link
Copy Markdown

Benchmark PR from qodo-benchmark#166

@tomerqodo
Copy link
Copy Markdown
Author

augment review

Copy link
Copy Markdown

@augmentcode augmentcode Bot left a comment

Choose a reason for hiding this comment

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

Review completed. 4 suggestions posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

),
);

if association.ext.is_empty() {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

CFBundleTypeExtensions is currently only inserted when association.ext.is_empty(), so for the common case (non-empty extensions) the key won’t be emitted and the extension-based association may not work on macOS.

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎

.name
.as_ref()
.unwrap_or(&association.ext[0].0)
.expect("File association must have a name")
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

CFBundleTypeName now unconditionally .expect(...)s association.name, but the schema/docs describe name as optional (defaulting to ext[0]) and the example config omits it; this can panic during bundling.

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎

if let Some(description) = &association.description {
dict.insert("UTTypeDescription".into(), description.clone().into());
}
if let Some(content_types) = &association.content_types {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

In UTExportedTypeDeclarations, UTTypeConformsTo is populated from association.content_types, but the config field for conformance is exportedType.conformsTo (ExportedFileAssociation::conforms_to); this seems likely to generate an incorrect UTI conformance list.

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎

"UTTypeIdentifier".into(),
exported_type.identifier.clone().into(),
);
if let Some(description) = &association.description {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

UTTypeDescription is sourced from association.description, which is documented in the schema as Windows-only; consider clarifying the config docs/semantics if this field is now also used for macOS exported type metadata.

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎

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.

1 participant