January 06, 2020
> https://i.webfreak.org/safe-test/index.html

Update:
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)
January 07, 2020
On Monday, 6 January 2020 at 23:05:29 UTC, WebFreak001 wrote:
>> [...]
>
> Update:
> now built using
> phobos commit c039fed84 (std.bitmanip.bitfields issues fixed)
> dmd commit 0ab7e90df (changes delegate to @safe by default)
>
> [...]

There are still false negatives - autowrap definitely builds.
January 07, 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. :)

January 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:
>>> [...]
>>
>> Update:
>> now built using
>> phobos commit c039fed84 (std.bitmanip.bitfields issues fixed)
>> dmd commit 0ab7e90df (changes delegate to @safe by default)
>>
>> [...]
>
> There are still false negatives - autowrap definitely builds.

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_DIR
January 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:
>> On Monday, 6 January 2020 at 23:05:29 UTC, WebFreak001 wrote:
>>>> [...]
>>>
>>> Update:
>>> now built using
>>> phobos commit c039fed84 (std.bitmanip.bitfields issues fixed)
>>> dmd commit 0ab7e90df (changes delegate to @safe by default)
>>>
>>> [...]
>>
>> There are still false negatives - autowrap definitely builds.
>
> 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_DIR

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).
January 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:
> > 
> > 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. :)

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.
January 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:
>> 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:
>>>>> [...]
>>>>
>>>> Update:
>>>> now built using
>>>> phobos commit c039fed84 (std.bitmanip.bitfields issues fixed)
>>>> dmd commit 0ab7e90df (changes delegate to @safe by default)
>>>>
>>>> [...]
>>>
>>> There are still false negatives - autowrap definitely builds.
>>
>> 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_DIR
>
> 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).

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.
January 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:
>> 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:
>>>>> [...]
>>>>
>>>> Update:
>>>> now built using
>>>> phobos commit c039fed84 (std.bitmanip.bitfields issues fixed)
>>>> dmd commit 0ab7e90df (changes delegate to @safe by default)
>>>>
>>>> [...]
>>>
>>> There are still false negatives - autowrap definitely builds.
>>
>> 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_DIR
>
> 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).

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.
January 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-d
wrote:
> > 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.
> >
> > :)
>
> 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.

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 Davis



January 08, 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.
1 2 3
Next ›   Last »