digitalmars.D - Re: DIP 1028 dub packages test package "sml"
- WebFreak001 (8/18) Jan 04 2020 I only test git packages, so your package is not processed
- WebFreak001 (1/2) Jan 04 2020 The list is now sorted alphabetically.
- Joakim =?UTF-8?B?QnLDpG5uc3Ryw7Zt?= (2/4) Jan 04 2020 Thank you
- WebFreak001 (26/27) Jan 06 2020 Update:
- Atila Neves (2/8) Jan 07 2020 There are still false negatives - autowrap definitely builds.
- WebFreak001 (12/22) Jan 07 2020 Running pre-generate commands for autowrap:pynih...
- Atila Neves (6/29) Jan 07 2020 Ah. I guess this project assumes that every project can be
- Jon Degenhardt (11/41) Jan 07 2020 The CI system has entries for custom build instructions
- WebFreak001 (12/42) Jan 07 2020 well this project should just give a general idea of the state of
- Mathias Lang (27/38) Jan 08 2020 Replying to
- Andrea Fontana (4/8) Jan 07 2020 We should try to write a tool like dustmite to annotate
- H. S. Teoh (8/18) Jan 07 2020 This is actually a good idea! It would alleviate the tedium of doing it
- Jonathan M Davis (8/23) Jan 07 2020 wrote:
- Gregor =?UTF-8?B?TcO8Y2ts?= (4/11) Jan 04 2020 Thanks for looking into this. Good to know the cause. There's
- Paul Backus (5/12) Jan 04 2020 You have a spurious failure for sumtype v0.9.4 because you are
- WebFreak001 (3/17) Jan 04 2020 thanks I fixed the tags and am updating it right now with the
- WebFreak001 (4/22) Jan 04 2020 alright changing this has fixed 8 packages in total building
- JN (5/8) Jan 04 2020 Looking at the error log, looks like most of the packages are
- WebFreak001 (5/15) Jan 04 2020 that thing has a fix PR now, with it applied it looks much better:
- Jon Degenhardt (35/54) Jan 04 2020 This is a very nice effort, thanks! It is definitely worth having
- Jon Degenhardt (11/18) Jan 04 2020 Nevermind the second idea, creating a branch marking getopt code
- ag0aep6g (4/11) Jan 04 2020 With DIP 1000, that should work. But it looks like std.getopt needs a
- Jon Degenhardt (8/20) Jan 04 2020 Thanks for taking a look at this.
- Jon Degenhardt (10/23) Jan 04 2020 Looking more closely at DIP 1000 doc - It appears to be saying
- James Blachly (2/12) Jan 06 2020 +1, I would love for this to be documented somewhere [that is easy to fi...
- Steven Schveighoffer (4/27) Jan 04 2020 Hmm.... I see arsd-official passes. I have trouble believing that. I see...
- Adam D. Ruppe (11/13) Jan 04 2020 yeah i suspect my thing isn't actually compiling there. I was
- Paul Backus (3/16) Jan 04 2020 You can always use `debug writeln(...);`, which ignores @safe,
- WebFreak001 (9/37) Jan 05 2020 $ dub build --build=syntax
- ShadoLight (18/24) Jan 05 2020 [snip]
On Saturday, 4 January 2020 at 14:46:40 UTC, Gregor Mückl wrote:On Saturday, 4 January 2020 at 10:22:34 UTC, WebFreak001 wrote:I only test git packages, so your package is not processed because: remote: Mercurial (hg) is required to use this repository. remote: remote: https://confluence.atlassian.com/x/vLRCMw fatal: unable to access 'https://bitbucket.org/gmueckl/sml-d/': The requested URL returned error: 405I have done this for all dub packages now so everyone can review what this change actually does to their packages: https://i.webfreak.org/safe-test/index.htmlI unfortunately have to question some of the results in that list. I have a single, simple package called "sml" in dub and it actually compiles (without safe by default). This contradicts what your list is stating.
Jan 04 2020
https://i.webfreak.org/safe-test/index.htmlThe list is now sorted alphabetically.
Jan 04 2020
On Saturday, 4 January 2020 at 15:22:49 UTC, WebFreak001 wrote:Thank youhttps://i.webfreak.org/safe-test/index.htmlThe list is now sorted alphabetically.
Jan 04 2020
https://i.webfreak.org/safe-test/index.htmlUpdate: now built using phobos commit c039fed84 (std.bitmanip.bitfields issues fixed) dmd commit 0ab7e90df (changes delegate to safe by default) now: (with dub build, not building tests) 478 packages compile 740 packages are still broken 499 packages are not buildable in the first place (eventually a lot only expected to be used as dependency and not standalone compilable) so out of the compiling ones 39.2% currently work with no problem. History: (adjusted to fix some build issues on my side) dmd made delegates without safety attribute safe by default: compiles: 478, broken: 740, n/a: 499 works: 39.2% phobos fixed the myToString method (fixes bitfields and some others) compiles: 456, broken: 762, n/a: 499 works: 37.4% initial tests: compiles: 324, broken: 894, n/a: 499 works: 26.6% I think we can still fix a little bit but I don't think we can go above 50% just by fixing phobos, dependencies on dub now also need to be updated (my index currently only uses a fixed version and isn't updated with any new releases)
Jan 06 2020
On Monday, 6 January 2020 at 23:05:29 UTC, WebFreak001 wrote:There are still false negatives - autowrap definitely builds.[...]Update: now built using phobos commit c039fed84 (std.bitmanip.bitfields issues fixed) dmd commit 0ab7e90df (changes delegate to safe by default) [...]
Jan 07 2020
On Tuesday, 7 January 2020 at 10:43:44 UTC, Atila Neves wrote:On Monday, 6 January 2020 at 23:05:29 UTC, WebFreak001 wrote:Running pre-generate commands for autowrap:pynih... make: Entering directory '/srv/http/org.webfreak.symbols/clones-2020-01-04_00-35-08/5dafbb00bce0bf24b5b71996-autowrap/pynih' make: 'source/python/raw.d' is up to date. make: Leaving directory '/srv/http/org.webfreak.symbols/clones-2020-01-04_00-35-08/5dafbb00bce0bf24b5b71996-autowrap/pynih' Invalid source/import path: /srv/http/org.webfreak.symbols/clones-2020-01-04_00-35-08/5dafbb00bce0bf24b5b71996-autowrap/python/source Invalid source/import path: /srv/http/org.webfreak.symbols/clones-2020-01-04_00-35-08/5dafbb00bce0bf24b5b71996-autowrap/python/source Invalid variable: PYTHON_LIB_DIRThere are still false negatives - autowrap definitely builds.[...]Update: now built using phobos commit c039fed84 (std.bitmanip.bitfields issues fixed) dmd commit 0ab7e90df (changes delegate to safe by default) [...]
Jan 07 2020
On Tuesday, 7 January 2020 at 11:12:28 UTC, WebFreak001 wrote:On Tuesday, 7 January 2020 at 10:43:44 UTC, Atila Neves wrote:Ah. I guess this project assumes that every project can be built/tested with dub as-is (dub build / dub test). For the ones with .travis.yml files it might be worth parsing the YAML and running the "script" section instead (it'll usually be dub test anyway).On Monday, 6 January 2020 at 23:05:29 UTC, WebFreak001 wrote:Running pre-generate commands for autowrap:pynih... make: Entering directory '/srv/http/org.webfreak.symbols/clones-2020-01-04_00-35-08/5dafbb00bce0bf24b5b71996-autowrap/pynih' make: 'source/python/raw.d' is up to date. make: Leaving directory '/srv/http/org.webfreak.symbols/clones-2020-01-04_00-35-08/5dafbb00bce0bf24b5b71996-autowrap/pynih' Invalid source/import path: /srv/http/org.webfreak.symbols/clones-2020-01-04_00-35-08/5dafbb00bce0bf24b5b71996-autowrap/python/source Invalid source/import path: /srv/http/org.webfreak.symbols/clones-2020-01-04_00-35-08/5dafbb00bce0bf24b5b71996-autowrap/python/source Invalid variable: PYTHON_LIB_DIRThere are still false negatives - autowrap definitely builds.[...]Update: now built using phobos commit c039fed84 (std.bitmanip.bitfields issues fixed) dmd commit 0ab7e90df (changes delegate to safe by default) [...]
Jan 07 2020
On Tuesday, 7 January 2020 at 16:45:09 UTC, Atila Neves wrote:On Tuesday, 7 January 2020 at 11:12:28 UTC, WebFreak001 wrote:The CI system has entries for custom build instructions (https://github.com/dlang/ci/blob/master/buildkite/build_project.sh#L124). Something similar could work for this. If available in a public repo then project owners could submit the instructions for their own repos. Such a setup could also provide a place to add projects that don't have dub entries. tilix, onedrive, and sambamba, are highly starred github projects that don't have dub entries. Including a few of these would be ideal. Of course, this would raise the cost of running building and running the tests. A perhaps cheaper option would be to setup special builds of the CI buildkite tests that turn on safety by default. A much smaller set of projects, but would provide more detailed info.On Tuesday, 7 January 2020 at 10:43:44 UTC, Atila Neves wrote:Ah. I guess this project assumes that every project can be built/tested with dub as-is (dub build / dub test). For the ones with .travis.yml files it might be worth parsing the YAML and running the "script" section instead (it'll usually be dub test anyway).On Monday, 6 January 2020 at 23:05:29 UTC, WebFreak001 wrote:Running pre-generate commands for autowrap:pynih... make: Entering directory '/srv/http/org.webfreak.symbols/clones-2020-01-04_00-35-08/5dafbb00bce0bf24b5b71996-autowrap/pynih' make: 'source/python/raw.d' is up to date. make: Leaving directory '/srv/http/org.webfreak.symbols/clones-2020-01-04_00-35-08/5dafbb00bce0bf24b5b71996-autowrap/pynih' Invalid source/import path: /srv/http/org.webfreak.symbols/clones-2020-01-04_00-35-08/5dafbb00bce0bf24b5b71996-autowrap/python/source Invalid source/import path: /srv/http/org.webfreak.symbols/clones-2020-01-04_00-35-08/5dafbb00bce0bf24b5b71996-autowrap/python/source Invalid variable: PYTHON_LIB_DIRThere are still false negatives - autowrap definitely builds.[...]Update: now built using phobos commit c039fed84 (std.bitmanip.bitfields issues fixed) dmd commit 0ab7e90df (changes delegate to safe by default) [...]
Jan 07 2020
On Tuesday, 7 January 2020 at 16:45:09 UTC, Atila Neves wrote:On Tuesday, 7 January 2020 at 11:12:28 UTC, WebFreak001 wrote:well this project should just give a general idea of the state of the ecosystem and not fully be able to build all projects. Right now this is a 50 line D file I manually run inside a GNU screen on a copy of my dub projects folder and then sort the output index.html using vim :p In reality a few more projects will actually build properly there, but a lot of project which currently are marked as working won't actually work because of used templates not being instantiated right now. So only really by having broken applications using the libraries it's possible to know which libraries are broken.On Tuesday, 7 January 2020 at 10:43:44 UTC, Atila Neves wrote:Ah. I guess this project assumes that every project can be built/tested with dub as-is (dub build / dub test). For the ones with .travis.yml files it might be worth parsing the YAML and running the "script" section instead (it'll usually be dub test anyway).On Monday, 6 January 2020 at 23:05:29 UTC, WebFreak001 wrote:Running pre-generate commands for autowrap:pynih... make: Entering directory '/srv/http/org.webfreak.symbols/clones-2020-01-04_00-35-08/5dafbb00bce0bf24b5b71996-autowrap/pynih' make: 'source/python/raw.d' is up to date. make: Leaving directory '/srv/http/org.webfreak.symbols/clones-2020-01-04_00-35-08/5dafbb00bce0bf24b5b71996-autowrap/pynih' Invalid source/import path: /srv/http/org.webfreak.symbols/clones-2020-01-04_00-35-08/5dafbb00bce0bf24b5b71996-autowrap/python/source Invalid source/import path: /srv/http/org.webfreak.symbols/clones-2020-01-04_00-35-08/5dafbb00bce0bf24b5b71996-autowrap/python/source Invalid variable: PYTHON_LIB_DIRThere are still false negatives - autowrap definitely builds.[...]Update: now built using phobos commit c039fed84 (std.bitmanip.bitfields issues fixed) dmd commit 0ab7e90df (changes delegate to safe by default) [...]
Jan 07 2020
On Tuesday, 7 January 2020 at 21:04:38 UTC, WebFreak001 wrote:well this project should just give a general idea of the state of the ecosystem and not fully be able to build all projects. Right now this is a 50 line D file I manually run inside a GNU screen on a copy of my dub projects folder and then sort the output index.html using vim :p In reality a few more projects will actually build properly there, but a lot of project which currently are marked as working won't actually work because of used templates not being instantiated right now. So only really by having broken applications using the libraries it's possible to know which libraries are broken.Replying to https://forum.dlang.org/post/kgztbeomocgzyiylamwn forum.dlang.org as well. Thanks for the explanation. So what happens is that, thanks to `-b syntax`, semantic3 is not called on the functions which are outside the (dub) package. In other word, the following code: ``` --- foo.d module foo; import bar; void main () safe { callSafe(); } --- bar.d module bar; void callSafe() safe { notReally(); } void notReally() system {} ``` Will not error out (try it: `dmd -o- foo.d`). Which is the expected behavior in that case. So all we need now is to have explicit ` system` on all functions, as Walter has proposed in the other thread.
Jan 08 2020
On Monday, 6 January 2020 at 23:05:29 UTC, WebFreak001 wrote:I think we can still fix a little bit but I don't think we can go above 50% just by fixing phobos, dependencies on dub now also need to be updated (my index currently only uses a fixed version and isn't updated with any new releases)We should try to write a tool like dustmite to annotate everything with system and then removing the system annotations while it works. :)
Jan 07 2020
On Tue, Jan 07, 2020 at 11:12:14AM +0000, Andrea Fontana via Digitalmars-d wrote:On Monday, 6 January 2020 at 23:05:29 UTC, WebFreak001 wrote:This is actually a good idea! It would alleviate the tedium of doing it manually, and it can be run as an upgrade tool on your source tree and more-or-less guarantee compilable code afterwards. This should address many of the complaints about code breakage. T -- 2+2=4. 2*2=4. 2^2=4. Therefore, +, *, and ^ are the same operation.I think we can still fix a little bit but I don't think we can go above 50% just by fixing phobos, dependencies on dub now also need to be updated (my index currently only uses a fixed version and isn't updated with any new releases)We should try to write a tool like dustmite to annotate everything with system and then removing the system annotations while it works. :)
Jan 07 2020
On Tuesday, January 7, 2020 11:44:15 AM MST H. S. Teoh via Digitalmars-d wrote:On Tue, Jan 07, 2020 at 11:12:14AM +0000, Andrea Fontana via Digitalmars-dwrote:One thing anyone writing such a tool would have to remember though is that any functions within a template or which have their return type inferred shouldn't have any attributes slapped on them, because they're inferred for those types of functions. - Jonathan M DavisOn Monday, 6 January 2020 at 23:05:29 UTC, WebFreak001 wrote:This is actually a good idea! It would alleviate the tedium of doing it manually, and it can be run as an upgrade tool on your source tree and more-or-less guarantee compilable code afterwards. This should address many of the complaints about code breakage.I think we can still fix a little bit but I don't think we can go above 50% just by fixing phobos, dependencies on dub now also need to be updated (my index currently only uses a fixed version and isn't updated with any new releases)We should try to write a tool like dustmite to annotate everything with system and then removing the system annotations while it works. :)
Jan 07 2020
On Saturday, 4 January 2020 at 15:19:39 UTC, WebFreak001 wrote:I only test git packages, so your package is not processed because: remote: Mercurial (hg) is required to use this repository. remote: remote: https://confluence.atlassian.com/x/vLRCMw fatal: unable to access 'https://bitbucket.org/gmueckl/sml-d/': The requested URL returned error: 405Thanks for looking into this. Good to know the cause. There's probably not a lot of packages using Mercurial, so this shouldn't skew the results much.
Jan 04 2020
On Saturday, 4 January 2020 at 15:19:39 UTC, WebFreak001 wrote:On Saturday, 4 January 2020 at 14:46:40 UTC, Gregor Mückl wrote:You have a spurious failure for sumtype v0.9.4 because you are compiling with DMD 2.060, an unsupported compiler version. Using the most recent stable DMD release will probably give you better results.On Saturday, 4 January 2020 at 10:22:34 UTC, WebFreak001 wrote:I have done this for all dub packages now so everyone can review what this change actually does to their packages: https://i.webfreak.org/safe-test/index.html
Jan 04 2020
On Saturday, 4 January 2020 at 17:07:32 UTC, Paul Backus wrote:On Saturday, 4 January 2020 at 15:19:39 UTC, WebFreak001 wrote:thanks I fixed the tags and am updating it right now with the bitfields patch appliedOn Saturday, 4 January 2020 at 14:46:40 UTC, Gregor Mückl wrote:You have a spurious failure for sumtype v0.9.4 because you are compiling with DMD 2.060, an unsupported compiler version. Using the most recent stable DMD release will probably give you better results.On Saturday, 4 January 2020 at 10:22:34 UTC, WebFreak001 wrote:I have done this for all dub packages now so everyone can review what this change actually does to their packages: https://i.webfreak.org/safe-test/index.html
Jan 04 2020
On Saturday, 4 January 2020 at 21:38:32 UTC, WebFreak001 wrote:On Saturday, 4 January 2020 at 17:07:32 UTC, Paul Backus wrote:alright changing this has fixed 8 packages in total building properly now. (unknown about other packages still not building properly, but at least meeting toolchain requirements)On Saturday, 4 January 2020 at 15:19:39 UTC, WebFreak001 wrote:thanks I fixed the tags and am updating it right now with the bitfields patch appliedOn Saturday, 4 January 2020 at 14:46:40 UTC, Gregor Mückl wrote:You have a spurious failure for sumtype v0.9.4 because you are compiling with DMD 2.060, an unsupported compiler version. Using the most recent stable DMD release will probably give you better results.On Saturday, 4 January 2020 at 10:22:34 UTC, WebFreak001 wrote:I have done this for all dub packages now so everyone can review what this change actually does to their packages: https://i.webfreak.org/safe-test/index.html
Jan 04 2020
On Saturday, 4 January 2020 at 15:19:39 UTC, WebFreak001 wrote:I have done this for all dub packages now so everyone can review what this change actually does to their packages: https://i.webfreak.org/safe-test/index.htmlLooking at the error log, looks like most of the packages are failing here: /opt/dmd-safe/dmd/generated/linux/release/64/../../../../../phobos std/bitmanip.d(64): Error: cast from `char[]` to `string` not allowed in safe code A single fix here might unblock a large chunk of projects.
Jan 04 2020
On Saturday, 4 January 2020 at 20:58:46 UTC, JN wrote:On Saturday, 4 January 2020 at 15:19:39 UTC, WebFreak001 wrote:that thing has a fix PR now, with it applied it looks much better: https://github.com/dlang/phobos/pull/7343#issuecomment-570820743 https://i.webfreak.org/safe-test/phobos-7343.html Will update index.html once it's mergedI have done this for all dub packages now so everyone can review what this change actually does to their packages: https://i.webfreak.org/safe-test/index.htmlLooking at the error log, looks like most of the packages are failing here: /opt/dmd-safe/dmd/generated/linux/release/64/../../../../../phobos std/bitmanip.d(64): Error: cast from `char[]` to `string` not allowed in safe code A single fix here might unblock a large chunk of projects.
Jan 04 2020
On Saturday, 4 January 2020 at 21:40:23 UTC, WebFreak001 wrote:On Saturday, 4 January 2020 at 20:58:46 UTC, JN wrote:This is a very nice effort, thanks! It is definitely worth having a realistic sense of the amount and nature of breakage. Looking at the tsv-utils error log, an issue that will affect applications more often than libraries is that uses of the std.getopt package are normally system. That's because getopt assumes the caller will pass the addresses of variables. If the variable is local, the compilation will fail in safe code. The code will typically be "safe" in that these references are not leaving the caller's scope, but the compiler still rejects the code in safe mode. This is unfortunate for two reasons. First, might not be easy to fix without redesigning or replacing std.getopt, and rewriting all the application code that uses it. Second, for this safe-testing effort, it may mask other problems that applications are likely to have that libraries would not, as the compilation is likely to fail early. On the second issue, to make progress building tsv-utils in safe mode, it'd be necessary to mark the tsv-utils routines that call getopt as trusted so that they can be used in an safe main(). I'd be reluctant to do this. For this safe evaluation effort, an option would be to create a separate phobos branch and mark std.getopt functions trusted to allow evaluation of calling code to proceed. A separate issue for the tsv-utils build. The initial failure is occurring in the dub build stub (dub_build.d, which uses getopt). This is causing the rest of the build fail. This is too bad because this is just part of the build system. There is no attempt to build any of the actual tools. It'd be interesting to see what compilation errors occur in the other tools. (Many will fail early due to getopt use, but still...). What would be better for tsv-utils would be to do a git clone and 'make test' command. This is what is being done in the dlang buildkite CI tests. --JonOn Saturday, 4 January 2020 at 15:19:39 UTC, WebFreak001 wrote:that thing has a fix PR now, with it applied it looks much better: https://github.com/dlang/phobos/pull/7343#issuecomment-570820743 https://i.webfreak.org/safe-test/phobos-7343.html Will update index.html once it's mergedI have done this for all dub packages now so everyone can review what this change actually does to their packages: https://i.webfreak.org/safe-test/index.htmlLooking at the error log, looks like most of the packages are failing here: /opt/dmd-safe/dmd/generated/linux/release/64/../../../../../phobos std/bitmanip.d(64): Error: cast from `char[]` to `string` not allowed in safe code A single fix here might unblock a large chunk of projects.
Jan 04 2020
On Saturday, 4 January 2020 at 22:43:10 UTC, Jon Degenhardt wrote:On the second issue, to make progress building tsv-utils in safe mode, it'd be necessary to mark the tsv-utils routines that call getopt as trusted so that they can be used in an safe main(). I'd be reluctant to do this. For this safe evaluation effort, an option would be to create a separate phobos branch and mark std.getopt functions trusted to allow evaluation of calling code to proceed.Nevermind the second idea, creating a branch marking getopt code trusted. This won't help. The code calling getopt would need to be marked trusted. It would be very useful to bypass failures related to getopt use to see what else remains. I don't immediately see an easy path to do this though without actually rewriting the calling code. As a general matter I think it would be useful to include more application code in these tests, as they may have different issues than the library code common in dub packages. --Jon
Jan 04 2020
On 04.01.20 23:43, Jon Degenhardt wrote:Looking at the tsv-utils error log, an issue that will affect applications more often than libraries is that uses of the std.getopt package are normally system. That's because getopt assumes the caller will pass the addresses of variables. If the variable is local, the compilation will fail in safe code. The code will typically be "safe" in that these references are not leaving the caller's scope, but the compiler still rejects the code in safe mode.With DIP 1000, that should work. But it looks like std.getopt needs a little push. An attempt: https://github.com/dlang/phobos/pull/7344
Jan 04 2020
On Sunday, 5 January 2020 at 00:34:42 UTC, ag0aep6g wrote:On 04.01.20 23:43, Jon Degenhardt wrote:Thanks for taking a look at this. Does this mean DIP 1000 modifies the rule against taking the address of local variables in safe functions? I did not realize this. Is there documentation somewhere describing the DIP 1000 rules for safe functions? It's hard to tell from the DIP 1000 doc, and the rationale for "Superseded" status indicates that the implementation doesn't match the text of the DIP.Looking at the tsv-utils error log, an issue that will affect applications more often than libraries is that uses of the std.getopt package are normally system. That's because getopt assumes the caller will pass the addresses of variables. If the variable is local, the compilation will fail in safe code. The code will typically be "safe" in that these references are not leaving the caller's scope, but the compiler still rejects the code in safe mode.With DIP 1000, that should work. But it looks like std.getopt needs a little push. An attempt: https://github.com/dlang/phobos/pull/7344
Jan 04 2020
On Sunday, 5 January 2020 at 01:13:14 UTC, Jon Degenhardt wrote:On Sunday, 5 January 2020 at 00:34:42 UTC, ag0aep6g wrote:Looking more closely at DIP 1000 doc - It appears to be saying that the compiler will try to prove addresses taken of local variable cannot be escaped. If the compiler can prove this, the function will pass safe even it the address of locals is taken. If the compiler cannot prove it, the code will need to be rewritten to pass safe. So no hard rules about taking the address of local variables or not. Developers need to try it and see. Is this a reasonable summary?With DIP 1000, that should work. But it looks like std.getopt needs a little push. An attempt: https://github.com/dlang/phobos/pull/7344Thanks for taking a look at this. Does this mean DIP 1000 modifies the rule against taking the address of local variables in safe functions? I did not realize this. Is there documentation somewhere describing the DIP 1000 rules for safe functions? It's hard to tell from the DIP 1000 doc, and the rationale for "Superseded" status indicates that the implementation doesn't match the text of the DIP.
Jan 04 2020
On 1/4/20 8:39 PM, Jon Degenhardt wrote:On Sunday, 5 January 2020 at 01:13:14 UTC, Jon Degenhardt wrote: Looking more closely at DIP 1000 doc - It appears to be saying that the compiler will try to prove addresses taken of local variable cannot be escaped. If the compiler can prove this, the function will pass safe even it the address of locals is taken. If the compiler cannot prove it, the code will need to be rewritten to pass safe. So no hard rules about taking the address of local variables or not. Developers need to try it and see. Is this a reasonable summary?+1, I would love for this to be documented somewhere [that is easy to find]
Jan 06 2020
On 1/4/20 4:40 PM, WebFreak001 wrote:On Saturday, 4 January 2020 at 20:58:46 UTC, JN wrote:Hmm.... I see arsd-official passes. I have trouble believing that. I see a number of safety violations, is this right? -SteveOn Saturday, 4 January 2020 at 15:19:39 UTC, WebFreak001 wrote:that thing has a fix PR now, with it applied it looks much better: https://github.com/dlang/phobos/pull/7343#issuecomment-570820743 https://i.webfreak.org/safe-test/phobos-7343.html Will update index.html once it's mergedI have done this for all dub packages now so everyone can review what this change actually does to their packages: https://i.webfreak.org/safe-test/index.htmlLooking at the error log, looks like most of the packages are failing here: /opt/dmd-safe/dmd/generated/linux/release/64/../../../../../phobos std/bitmanip.d(64): Error: cast from `char[]` to `string` not allowed in safe code A single fix here might unblock a large chunk of projects.
Jan 04 2020
On Sunday, 5 January 2020 at 03:04:38 UTC, Steven Schveighoffer wrote:Hmm.... I see arsd-official passes. I have trouble believing that. I see a number of safety violations, is this right?yeah i suspect my thing isn't actually compiling there. I was going to test it locally today but got busy writing websocket client code and haven't gotten around to it yet. Though I suspect most my code will pass, in my writing today I kept doing `writeln(cast(string) some_mutable_ubyte_array);` and i realized safe by default would be constantly complaining about that. I suspect it will drive me absolutely nuts at least while debugging stuff...
Jan 04 2020
On Sunday, 5 January 2020 at 03:09:49 UTC, Adam D. Ruppe wrote:On Sunday, 5 January 2020 at 03:04:38 UTC, Steven Schveighoffer wrote:You can always use `debug writeln(...);`, which ignores safe, right?Hmm.... I see arsd-official passes. I have trouble believing that. I see a number of safety violations, is this right?yeah i suspect my thing isn't actually compiling there. I was going to test it locally today but got busy writing websocket client code and haven't gotten around to it yet. Though I suspect most my code will pass, in my writing today I kept doing `writeln(cast(string) some_mutable_ubyte_array);` and i realized safe by default would be constantly complaining about that. I suspect it will drive me absolutely nuts at least while debugging stuff...
Jan 04 2020
On Sunday, 5 January 2020 at 03:04:38 UTC, Steven Schveighoffer wrote:On 1/4/20 4:40 PM, WebFreak001 wrote:$ dub build --build=syntax Performing "syntax" build using /usr/bin/dmd for x86_64. arsd-official 5.0.0+commit.5.ga023662: building configuration "library"... it doesn't test subPackages yet but just the "package.d" with 1 line of code being "module arsd" compiles fine with safe by defaultOn Saturday, 4 January 2020 at 20:58:46 UTC, JN wrote:Hmm.... I see arsd-official passes. I have trouble believing that. I see a number of safety violations, is this right? -SteveOn Saturday, 4 January 2020 at 15:19:39 UTC, WebFreak001 wrote:that thing has a fix PR now, with it applied it looks much better: https://github.com/dlang/phobos/pull/7343#issuecomment-570820743 https://i.webfreak.org/safe-test/phobos-7343.html Will update index.html once it's mergedI have done this for all dub packages now so everyone can review what this change actually does to their packages: https://i.webfreak.org/safe-test/index.htmlLooking at the error log, looks like most of the packages are failing here: /opt/dmd-safe/dmd/generated/linux/release/64/../../../../../phobos std/bitmanip.d(64): Error: cast from `char[]` to `string` not allowed in safe code A single fix here might unblock a large chunk of projects.
Jan 05 2020
On Saturday, 4 January 2020 at 15:19:39 UTC, WebFreak001 wrote: [snip][snip] Nice! And surprisingly useful/interesting to "just scroll" down and view the results for all the packages you are familiar with :-). Is it not possible to have a similar list permanently on a dub page (periodically updated of course), showing the build status with the latest official DMD compiler? Even if it is only updated/re-generated each time a new version of the compiler is released? I know there is a "list view" of the packages on dub (which can be sorted by column), but this does not show build status. Also, there are some compile failures in your list - such as for dpp/sumtype/etc - which fails because of build requirements not satisfied: Installed dmd- with frontend 2.060 does not comply with sumtype frontend requirement: >=2.88.0I have done this for all dub packages now so everyone can review what this change actually does to their packages: https://i.webfreak.org/safe-test/index.html
Jan 05 2020