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

Change hasQuarantineAttribute(_:) to hasAttribute(_:_:) #414

Merged
merged 6 commits into from
May 10, 2023

Conversation

MaxDesiatov
Copy link
Contributor

Makes the attribute reading API more generic as discussed at #412 (comment)

@MaxDesiatov
Copy link
Contributor Author

@swift-ci test

@MaxDesiatov MaxDesiatov self-assigned this Apr 21, 2023
@MaxDesiatov
Copy link
Contributor Author

@swift-ci test

@@ -347,9 +347,9 @@ private struct LocalFileSystem: FileSystem {
return FileInfo(attrs)
}

func hasQuarantineAttribute(_ path: AbsolutePath) -> Bool {
func hasAttribute(name: String, _ path: AbsolutePath) -> Bool {
#if canImport(Darwin)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Doesn't look like getxattr is available with import Glibc so I'm not adding a check for Linux in this condition for now.

Copy link
Member

Choose a reason for hiding this comment

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

Ah, okay; that seems like a different bug to resolve separately.

@MaxDesiatov
Copy link
Contributor Author

@swift-ci test windows

@MaxDesiatov
Copy link
Contributor Author

@swift-ci clean test macos

@@ -347,9 +347,9 @@ private struct LocalFileSystem: FileSystem {
return FileInfo(attrs)
}

func hasQuarantineAttribute(_ path: AbsolutePath) -> Bool {
func hasAttribute(name: String, _ path: AbsolutePath) -> Bool {
#if canImport(Darwin)
Copy link
Member

Choose a reason for hiding this comment

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

Ah, okay; that seems like a different bug to resolve separately.

@MaxDesiatov
Copy link
Contributor Author

@swift-ci test

@MaxDesiatov
Copy link
Contributor Author

@swift-ci test windows

@MaxDesiatov
Copy link
Contributor Author

@swift-ci clean test macos

@MaxDesiatov
Copy link
Contributor Author

@swift-ci test macos

@MaxDesiatov
Copy link
Contributor Author

@swift-ci test macos

@MaxDesiatov MaxDesiatov force-pushed the maxd/has-attribute branch from 04acdab to e93cb40 Compare May 10, 2023 14:10
@MaxDesiatov
Copy link
Contributor Author

@swift-ci test

@MaxDesiatov MaxDesiatov enabled auto-merge (squash) May 10, 2023 14:11
@MaxDesiatov MaxDesiatov disabled auto-merge May 10, 2023 14:11
@MaxDesiatov MaxDesiatov changed the title Change hasQuarantineAttribute(_:) to hasAttribute(name:_:) Change hasQuarantineAttribute(_:) to hasAttribute(_:_:) May 10, 2023
@MaxDesiatov MaxDesiatov enabled auto-merge (squash) May 10, 2023 14:12
@MaxDesiatov
Copy link
Contributor Author

@swift-ci test windows

Copy link
Member

@compnerd compnerd left a comment

Choose a reason for hiding this comment

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

Thanks! This looks great!

@MaxDesiatov
Copy link
Contributor Author

@swift-ci test

@MaxDesiatov
Copy link
Contributor Author

@swift-ci test windows

1 similar comment
@MaxDesiatov
Copy link
Contributor Author

@swift-ci test windows

@MaxDesiatov
Copy link
Contributor Author

@swift-ci test

@MaxDesiatov
Copy link
Contributor Author

@swift-ci test windows

@MaxDesiatov MaxDesiatov merged commit b3d8257 into main May 10, 2023
@MaxDesiatov MaxDesiatov deleted the maxd/has-attribute branch May 10, 2023 17:43
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.

4 participants