Open
Description
These two error names are common through the Zig codebase, but they seem to be used pretty much interchangeably and don't seem to ever be used to convey unique information, so it seems like one canonical version should be chosen and used everywhere (or a distinction should be made about when to use one over another).
Some evidence for why I think it might make sense to merge them:
There is no explicit error set that I can find that includes bothPermissionDenied
andAccessDenied
, meaning that there is (presumably) nothing that intentionally uses one name over another to convey unique information. Put another way, there wouldn't be any information that is currently conveyed that would be lost if they were merged.- There is currently one instance of a translation between the two error names:
error.AccessDenied => return error.PermissionDenied
(and more will be added by Windows: FixTooManyParentDirs
handling for paths that shouldn't be cwd-relative #16783) - There are 3 instances of
.ACCESS_DENIED => return error.PermissionDenied
and 7 instances of.ACCES => return error.PermissionDenied
- There are 42 instances of
.PERM => return error.AccessDenied
In terms of which is more common:
- There are 50 instances of
return error.PermissionDenied
- There are 144 instances of
return error.AccessDenied
Activity