chapel-lang / chapel

a Productive Parallel Programming Language
https://chapel-lang.org
Other
1.78k stars 420 forks source link

Convert standard/internal/package modules to initializers #8301

Closed bradcray closed 6 years ago

bradcray commented 6 years ago

This issue is intended to capture the work remaining to convert the modules/ directory's contents over from constructors to initializers. This is an effort I've been working on during spare-time cycles over the past month or so and have gotten pretty close on. Here are cases that still need work:

Internal

Standard

Package

bradcray commented 6 years ago

Filtering out the cases known not to be converted above (domain maps, OwnedObject, string), I got failures for the following tests, some of which are designed to ensure constructors are still working. The only case I think I detected which was left unconverted in modules was RecordParser which I'll take a quick look at:

lydia-duncan commented 6 years ago

The following have a counterpart in the initializers directory:

The following are initializer tests with intentional constructors, that should be removed when constructors are fully deprecated and removed.

The following were intentionally skipped in #6530, some to intentionally remove later and the others to update when other features were added (noinit in this case)

These rely on domains/distributions/arrays getting updated for initializers

I think this one would work once reductions explicitly use default initializers, so would wait until then

Should be updated once we decide to deprecate constructors

Issue with nested records and classes with generics

Needs support of error handling statements in initializers

Has a version of the constructors that are initializers commented out, probably ready for the switch.

Bug with nil as the default value for a class initializers

Semantic question on how to update this test prevented it from getting updated earlier.

I don't see any reason why these couldn't be updated now

benharsh commented 6 years ago

Closing now that initializers are on by default and a warning is emitted for constructors.