[Issue 15364] BitArray.len should be private
https://issues.dlang.org/show_bug.cgi?id=15364 tmarpl...@gmail.com changed: What|Removed |Added CC||tmarpl...@gmail.com --- Comment #7 from tmarpl...@gmail.com --- The following commit related to this issue https://github.com/dlang/phobos/commit/74fbb79087c46ebde38ac3648b6a46b76f2a0a9e has apparently overreached when setting bitsPerSizeT as private state. The intended fix is successful in hiding .len and .ptr, but there is no explicit rationale (in this thread and in the commit message) for also encapsulating .bitsPerSizeT. Namely, the question is: why has BitArray.bitsPerSizeT been made a private member? It's an enum. It can't be accidentally nor intentionally rewritten. I've ran into "variable std.bitmanip.BitArray.bitsPerSizeT is not accessible from module" errors because my module imports from an (albeit old) library which implements certain bit setting algorithm that relies on BitArray.bitsPerSizeT being publicly accessible. (If you need to know, the library in question is artemisd:) https://github.com/elvisxzhou/artemisd After examining the problem, the commit and the issue that produced the problem, I believe that the mentioned commit introduces an unintended regression, and that it deserves to be reviewed. --
[Issue 15364] BitArray.len should be private
https://issues.dlang.org/show_bug.cgi?id=15364 --- Comment #6 from Steven Schveighoffer--- Just as a matter of record, here is the commit that fixed this issue: https://github.com/dlang/phobos/commit/43227b12c462ab116539302570eeff1ed6dd8d74 --
[Issue 15364] BitArray.len should be private
https://issues.dlang.org/show_bug.cgi?id=15364 Andrei Alexandrescuchanged: What|Removed |Added Status|REOPENED|RESOLVED CC||and...@erdani.com Resolution|--- |FIXED --- Comment #5 from Andrei Alexandrescu --- Current compilation result: /d498/f670.d(6): Error: no property 'len' for type 'BitArray', did you mean '_len --
[Issue 15364] BitArray.len should be private
https://issues.dlang.org/show_bug.cgi?id=15364 Steven Schveighofferchanged: What|Removed |Added Status|RESOLVED|REOPENED CC||schvei...@yahoo.com Resolution|FIXED |--- Severity|normal |major --- Comment #4 from Steven Schveighoffer --- Has been "reverted", albeit with deprecations. Reopening so it doesn't get forgotten -- yes, you can once again mess up BitArray by writing directly to len and ptr. Reference: https://github.com/D-Programming-Language/phobos/pull/3950 --
[Issue 15364] BitArray.len should be private
https://issues.dlang.org/show_bug.cgi?id=15364 --- Comment #3 from b2.t...@gmx.com --- If you land here because some code is broken in phobos 2.070 note that you can fix by using the copy constructor that takes a size_t & void* (len,ptr) as parameter. --
[Issue 15364] BitArray.len should be private
https://issues.dlang.org/show_bug.cgi?id=15364 --- Comment #2 from github-bugzi...@puremagic.com --- Commits pushed to stable at https://github.com/D-Programming-Language/phobos https://github.com/D-Programming-Language/phobos/commit/74fbb79087c46ebde38ac3648b6a46b76f2a0a9e fix issue 15364 - BitArray.len should be private https://github.com/D-Programming-Language/phobos/commit/c254fecc4824a884024e7907e2185cfc95e4c64d Merge pull request #3822 from Blumerline/patch-privatearrayfield --
[Issue 15364] BitArray.len should be private
https://issues.dlang.org/show_bug.cgi?id=15364 --- Comment #1 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/D-Programming-Language/phobos https://github.com/D-Programming-Language/phobos/commit/74fbb79087c46ebde38ac3648b6a46b76f2a0a9e fix issue 15364 - BitArray.len should be private https://github.com/D-Programming-Language/phobos/commit/c254fecc4824a884024e7907e2185cfc95e4c64d Merge pull request #3822 from Blumerline/patch-privatearrayfield fix issue 15364 - BitArray.len should be private --