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

Add FileAttributes.None #89130

Merged
merged 2 commits into from
Aug 2, 2023
Merged

Conversation

meziantou
Copy link
Contributor

Fix #83125

@dotnet-issue-labeler
Copy link

Note regarding the new-api-needs-documentation label:

This serves as a reminder for when your PR is modifying a ref *.cs file and adding/modifying public APIs, please make sure the API implementation in the src *.cs file is documented with triple slash comments, so the PR reviewers can sign off that change.

@ghost ghost added the community-contribution Indicates that the PR has been added by a community member label Jul 18, 2023
@ghost
Copy link

ghost commented Jul 18, 2023

Tagging subscribers to this area: @dotnet/area-system-io
See info in area-owners.md if you want to be subscribed.

Issue Details

Fix #83125

Author: meziantou
Assignees: -
Labels:

area-System.IO, new-api-needs-documentation

Milestone: -

@stephentoub
Copy link
Member

Thanks

Comment on lines +189 to +190
json = JsonSerializer.Serialize((FileAttributes)(-1), options);
Assert.Equal(@"-1", json);
Copy link
Contributor Author

@meziantou meziantou Jul 19, 2023

Choose a reason for hiding this comment

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

I think the previous test was validating that an unknown value is serialized as a number.

FileAttributes.Compressed & FileAttributes.Device is now None. So, the test fails on net8 but succeeds on net462. I replaced the value with an unknown value (-1).

Copy link
Member

@adamsitnik adamsitnik left a comment

Choose a reason for hiding this comment

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

LGTM, thank you for your contribution @meziantou !

@adamsitnik
Copy link
Member

@meziantou could you please sync your branch with upstream? It should get the CI green

@adamsitnik
Copy link
Member

@jeffhandley I request for the permission to merge (it's nice to have, the risk is very low)

@meziantou
Copy link
Contributor Author

@adamsitnik the build is still red after synching the branch, but there are less errors.

@adamsitnik
Copy link
Member

I'll close the PR and open it again, as the CI has not cancelled a very long running leg:

image

@adamsitnik adamsitnik closed this Aug 1, 2023
@adamsitnik adamsitnik reopened this Aug 1, 2023
Copy link
Member

@jeffhandley jeffhandley left a comment

Choose a reason for hiding this comment

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

I approve of merging this in for RC1. It's a nice value-add with low risk.

@adamsitnik adamsitnik merged commit 23f7dbd into dotnet:main Aug 2, 2023
168 checks passed
@adamsitnik adamsitnik added this to the 8.0.0 milestone Aug 2, 2023
@meziantou meziantou deleted the fileattributes-none branch August 2, 2023 13:42
@ghost ghost locked as resolved and limited conversation to collaborators Sep 1, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-System.IO community-contribution Indicates that the PR has been added by a community member new-api-needs-documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[API Proposal]: Add FileAttributes.None
4 participants