LogtalkDotOrg / logtalk3

Logtalk - declarative object-oriented logic programming language
https://logtalk.org
Apache License 2.0
425 stars 31 forks source link

SWI-Prolog 8.5.16 Windows regression: `nul` no longer understood by the `open/3-4` predicates #153

Closed pmoura closed 2 years ago

pmoura commented 2 years ago

The SWI-Prolog 8.5.16 Windows version have a regression that breaks key libraries and a large number of tests: nulis no longer understood by the open/3-4 predicates. This bug is not present in the previous version (8.5.15). If you're using running Logtalk with SWI-Prolog on Windows, avoid upgrading to version 8.5.16 and look for a possible fix in the next versions.

JanWielemaker commented 2 years ago

Thanks. I see. We can't use the "\\?\" prefix to get support for long file paths for the Windows "special" files :cry:

P.s. Is it an option to use open_null_stream/1 (inherited from Quintus, no clue how widely used it is)?

JanWielemaker commented 2 years ago

Should be ok with SWI-Prolog/swipl-devel@1b9ec8d1cdcdafad37514e0c2e826fc60a26345d

pmoura commented 2 years ago

P.s. Is it an option to use open_null_stream/1 (inherited from Quintus, no clue how widely used it is)?

Possible, yes. But would require use of conditional compilation directives in multiple places.

Thanks for the quick fix. I will try it when the next nightly build for the Windows binary installer become available.

Note that you can run Logtalk distribution tests automated on Windows using the provided scripts/logtalk_tester.ps1 PowerShell script. That would have readily flagged this regression.

pmoura commented 2 years ago

Fix confirmed using the swipl-w64-2022-09-08.exe nightly build.