pike issueshttps://git.lysator.liu.se/pikelang/pike/-/issues2024-03-23T16:12:33Zhttps://git.lysator.liu.se/pikelang/pike/-/issues/10149Pike doesn't build against libmysql (on MacOS)2024-03-23T16:12:33ZChris AngelicoPike doesn't build against libmysql (on MacOS)Building Pike against libmysql v10 breaks due to the removal of several deprecated functions such as https://dev.mysql.com/doc/c-api/8.0/en/mysql-shutdown.html (page does not exist in the v10 docs). This is not a problem when building ag...Building Pike against libmysql v10 breaks due to the removal of several deprecated functions such as https://dev.mysql.com/doc/c-api/8.0/en/mysql-shutdown.html (page does not exist in the v10 docs). This is not a problem when building against libmariadb (as is standard on Debian and other Linuxes now).
Have not confirmed whether every deprecated function has a query equivalent (as mysql_shutdown does).
Testing against actual libmysql on Linux was unsuccessful for other reasons and is inconclusive, so this may be a Mac-specific issue?Pike 9.0https://git.lysator.liu.se/pikelang/pike/-/issues/10145Update the set of attributes in later compiler passes2024-02-18T01:01:50ZHenrik (Grubba) GrubbströmUpdate the set of attributes in later compiler passesCurrently the set of attributes is set by `low_add_identifier()`, which is typically only called in the first pass of the compiler. This means that it may get called with placeholder objects.
This can be observed by the following (LysLy...Currently the set of attributes is set by `low_add_identifier()`, which is typically only called in the first pass of the compiler. This means that it may get called with placeholder objects.
This can be observed by the following (LysLysKOM 26239366):
```
// -*- mode: Pike; c-basic-offset: 4; -*-
class Anno(string label) {
inherit Pike.Annotation;
@constant;
protected string _sprintf(int c) {
return sprintf("%O(%O)", object_program(this), label);
}
}
@Anno("foobar"):
void some_func() { }
int main(int argc, array(string) argv)
{
werror("Annotations: %O\n", mkmapping(indices(this), annotations(this)));
}
```
Which currently outputs:
```
Annotations: ([ /* 3 elements */
"Anno": 0,
"main": 0,
"some_func": (< /* 1 element */
/main()->Anno(0)
>)
])
```
Note the `Anno(0)` rather than the expected `Anno("foobar")`.
Thanks to @Rosuav for the example.Pike 9.0https://git.lysator.liu.se/pikelang/pike/-/issues/10141Add support for fftw 3.x (Math.Transforms.FFT)2024-01-14T14:40:40ZHenrik (Grubba) GrubbströmAdd support for fftw 3.x (Math.Transforms.FFT)The API in fftw 3.x seems to have changed drastically.
Superficial changes:
* There is now only a single header-file named `<fftw3.h>`.
* There is now only a single library named `fftw3`.
* Many of the API functions have been renamed or...The API in fftw 3.x seems to have changed drastically.
Superficial changes:
* There is now only a single header-file named `<fftw3.h>`.
* There is now only a single library named `fftw3`.
* Many of the API functions have been renamed or restructured.Pike Nexthttps://git.lysator.liu.se/pikelang/pike/-/issues/10138gethrvtime() overflow on netbsd2023-11-28T13:44:10ZHenrik (Grubba) Grubbströmgethrvtime() overflow on netbsdFrom the Pike developers mailinglist/LysLysKOM 26092611:
```
26092611 2023-11-24 04:29 /35 rader/ <william@welliver.org>
Sänt av: SRS0=LsSK=HF=lists.lysator.liu.se=pike-devel-bounces@lysator.liu.se
Importerad: 2023-11-24 04:29 av Brevbär...From the Pike developers mailinglist/LysLysKOM 26092611:
```
26092611 2023-11-24 04:29 /35 rader/ <william@welliver.org>
Sänt av: SRS0=LsSK=HF=lists.lysator.liu.se=pike-devel-bounces@lysator.liu.se
Importerad: 2023-11-24 04:29 av Brevbäraren
Extern mottagare: pike-devel@lists.lysator.liu.se
Mottagare: Pike (-) developers forum <21444>
Ärende: gethrvtime() overflow on netbsd
------------------------------------------------------------
```
Hello all,
I've been working on a new stable release and in the course of the usual
checks, I noticed that pike farm builds are failing on netbsd (9.3). A
little investigation shows that the benchmark is effectively timing out.
I think this failure is caused by the code that limits a test to a given
amount of time.
Basically, the elapsed time is calculated as final_time - start_time as
returned by `gethrvtime()`, and it appears that on netbsd, there's (I'm
assuming) an overflow that causes the elapsed time to become negative.
It happens often enough that the total amount of time spent on a given
set of test runs becomes increasingly negative, essentially running any
test forever.
I"m sure that there's a better solution but I'd like to suggest that in
the interim, a simple check be added to ignore any negative times:
In `Tools.Shoot.run_sub()`:
From:
```
tg += (hrt - start_cpu) / 1000000.0;
```
To:
```
int te = hrt - start_cpu;
if(te < 0 ) te = 0;
tg += te / 1000000.0;
```
Does anyone have any objection to me making this change in 9.0 and 8.0?
Bill
```
(26092611) /<william@welliver.org>/-----------------
```Pike 8.0https://git.lysator.liu.se/pikelang/pike/-/issues/10127Fix QA complaints from Gentoo Ebuild of Pike 8.0.17382023-06-29T10:13:14ZHenrik (Grubba) GrubbströmFix QA complaints from Gentoo Ebuild of Pike 8.0.1738```
* QA Notice: Binary files linked to libcrypt.so found
* But a dependency on virtual/libcrypt is not declared!
*
* /var/tmp/portage/dev-lang/pike-8.0.1738-r1/image/usr/bin/pike
*
* Please add virtual/libcrypt:= dependency
*...```
* QA Notice: Binary files linked to libcrypt.so found
* But a dependency on virtual/libcrypt is not declared!
*
* /var/tmp/portage/dev-lang/pike-8.0.1738-r1/image/usr/bin/pike
*
* Please add virtual/libcrypt:= dependency
* Gentoo bug: https://bugs.gentoo.org/699422
* Tracker bug: https://bugs.gentoo.org/798963
* See: https://wiki.gentoo.org/wiki/Project:Toolchain/libcrypt_implementation
* QA Notice: Found the following implicit function declarations in configure logs:
* /var/tmp/portage/dev-lang/pike-8.0.1738-r1/work/Pike-v8.0.1738/build/linux-5.16.2-gentoo-x86_64/config.log:739 - _bswap
* /var/tmp/portage/dev-lang/pike-8.0.1738-r1/work/Pike-v8.0.1738/build/linux-5.16.2-gentoo-x86_64/config.log:817 - _bswap64
* /var/tmp/portage/dev-lang/pike-8.0.1738-r1/work/Pike-v8.0.1738/build/linux-5.16.2-gentoo-x86_64/config.log:895 - _bit_scan_reverse
* /var/tmp/portage/dev-lang/pike-8.0.1738-r1/work/Pike-v8.0.1738/build/linux-5.16.2-gentoo-x86_64/config.log:973 - _bit_scan_forward
* /var/tmp/portage/dev-lang/pike-8.0.1738-r1/work/Pike-v8.0.1738/build/linux-5.16.2-gentoo-x86_64/config.log:1359 - _byteswap_ulong
* /var/tmp/portage/dev-lang/pike-8.0.1738-r1/work/Pike-v8.0.1738/build/linux-5.16.2-gentoo-x86_64/config.log:1439 - _byteswap_uint64
* /var/tmp/portage/dev-lang/pike-8.0.1738-r1/work/Pike-v8.0.1738/build/linux-5.16.2-gentoo-x86_64/config.log:1519 - __cntlz4
* /var/tmp/portage/dev-lang/pike-8.0.1738-r1/work/Pike-v8.0.1738/build/linux-5.16.2-gentoo-x86_64/config.log:1597 - __cntlz8
* /var/tmp/portage/dev-lang/pike-8.0.1738-r1/work/Pike-v8.0.1738/build/linux-5.16.2-gentoo-x86_64/config.log:1675 - __cnttz4
* /var/tmp/portage/dev-lang/pike-8.0.1738-r1/work/Pike-v8.0.1738/build/linux-5.16.2-gentoo-x86_64/config.log:1753 - __cnttz8
* /var/tmp/portage/dev-lang/pike-8.0.1738-r1/work/Pike-v8.0.1738/build/linux-5.16.2-gentoo-x86_64/config.log:2046 - yylex
* /var/tmp/portage/dev-lang/pike-8.0.1738-r1/work/Pike-v8.0.1738/build/linux-5.16.2-gentoo-x86_64/config.log:2057 - yylex
* /var/tmp/portage/dev-lang/pike-8.0.1738-r1/work/Pike-v8.0.1738/build/linux-5.16.2-gentoo-x86_64/config.log:13522 - pthread_yield_np
* /var/tmp/portage/dev-lang/pike-8.0.1738-r1/work/Pike-v8.0.1738/build/linux-5.16.2-gentoo-x86_64/config.log:14227 - getpid
* /var/tmp/portage/dev-lang/pike-8.0.1738-r1/work/Pike-v8.0.1738/build/linux-5.16.2-gentoo-x86_64/config.log:23768 - infnan
* /var/tmp/portage/dev-lang/pike-8.0.1738-r1/work/Pike-v8.0.1738/build/linux-5.16.2-gentoo-x86_64/config.log:24033 - _isnan
* /var/tmp/portage/dev-lang/pike-8.0.1738-r1/work/Pike-v8.0.1738/build/linux-5.16.2-gentoo-x86_64/config.log:26347 - fpsetmask
* /var/tmp/portage/dev-lang/pike-8.0.1738-r1/work/Pike-v8.0.1738/build/linux-5.16.2-gentoo-x86_64/config.log:26635 - fpsetround
* /var/tmp/portage/dev-lang/pike-8.0.1738-r1/work/Pike-v8.0.1738/build/linux-5.16.2-gentoo-x86_64/config.log:26954 - GetSystemTimeAsFileTime
* /var/tmp/portage/dev-lang/pike-8.0.1738-r1/work/Pike-v8.0.1738/build/linux-5.16.2-gentoo-x86_64/modules/Fuse/config.log:203 - exit
* /var/tmp/portage/dev-lang/pike-8.0.1738-r1/work/Pike-v8.0.1738/build/linux-5.16.2-gentoo-x86_64/modules/HTTPLoop/config.log:723 - sendfile
* /var/tmp/portage/dev-lang/pike-8.0.1738-r1/work/Pike-v8.0.1738/build/linux-5.16.2-gentoo-x86_64/modules/HTTPLoop/config.log:729 - sendfile
* /var/tmp/portage/dev-lang/pike-8.0.1738-r1/work/Pike-v8.0.1738/build/linux-5.16.2-gentoo-x86_64/modules/Mysql/config.log:883 - mysql_connect
* /var/tmp/portage/dev-lang/pike-8.0.1738-r1/work/Pike-v8.0.1738/build/linux-5.16.2-gentoo-x86_64/modules/Mysql/config.log:1016 - mysql_connect
* /var/tmp/portage/dev-lang/pike-8.0.1738-r1/work/Pike-v8.0.1738/build/linux-5.16.2-gentoo-x86_64/modules/Wnotify/config.log:466 - FindFirstChangeNotification
* /var/tmp/portage/dev-lang/pike-8.0.1738-r1/work/Pike-v8.0.1738/build/linux-5.16.2-gentoo-x86_64/modules/_Stdio/config.log:2071 - sendfile
* /var/tmp/portage/dev-lang/pike-8.0.1738-r1/work/Pike-v8.0.1738/build/linux-5.16.2-gentoo-x86_64/modules/_Stdio/config.log:2077 - sendfile
* /var/tmp/portage/dev-lang/pike-8.0.1738-r1/work/Pike-v8.0.1738/build/linux-5.16.2-gentoo-x86_64/modules/_math/config.log:747 - fpsetround
* /var/tmp/portage/dev-lang/pike-8.0.1738-r1/work/Pike-v8.0.1738/build/linux-5.16.2-gentoo-x86_64/modules/system/config.log:3221 - setprgp
* Check that no features were accidentally disabled.
* See https://wiki.gentoo.org/wiki/Modern_C_porting.
```Pike 8.0https://git.lysator.liu.se/pikelang/pike/-/issues/10123Overloading of getter/setters with plain variables seems broken2023-05-16T16:06:23ZHenrik (Grubba) GrubbströmOverloading of getter/setters with plain variables seems brokenFrom `jonasw` @ Roxen Slack:
```
class Op
{
object `data() {}
string _sprintf() {
return sprintf("%s(%O)",
function_name(object_program(this)),
data || "-");
}
}
class Op1(object mupp)
{
...From `jonasw` @ Roxen Slack:
```
class Op
{
object `data() {}
string _sprintf() {
return sprintf("%s(%O)",
function_name(object_program(this)),
data || "-");
}
}
class Op1(object mupp)
{
inherit Op;
object `data() { return mupp; }
}
class Op2(object data)
{
inherit Op;
// object `data() { return this::data; }
}
class Data()
{
string _sprintf() { return "DATA"; }
}
void main()
{
object data = Data();
werror("op1: %O, op2: %O\n", Op1(data), Op2(data));
}
```
When the above is run (Pike 8.0.1832 or 9.0.1), the following is output:
```
op1: Op1(DATA), op2: Op2("-")
```
The comment in `Op2` triggers a compilation error due to the name clash between the variable `data` and the getter of the same name.
It looks like the reference to `data` in `Op()->_sprintf()` has a `local`/`inline` scope even though `data` has not been declared as such.Pike 8.0https://git.lysator.liu.se/pikelang/pike/-/issues/10106Update the Autodoc extractor to support the multi-assign in function calls sy...2023-01-01T12:47:25ZHenrik (Grubba) GrubbströmUpdate the Autodoc extractor to support the multi-assign in function calls syntax.The changes in #10098, #10100 and #10103 need to also be supported by `Tools.AutoDoc.PikeParser`.The changes in #10098, #10100 and #10103 need to also be supported by `Tools.AutoDoc.PikeParser`.Pike 9.0https://git.lysator.liu.se/pikelang/pike/-/issues/10087Pike HTTPS server timeout issue with Chrome2022-09-08T13:21:02ZMartin NilssonPike HTTPS server timeout issue with ChromeA Protocols.HTTP.Server using SSLFile can end up in a bad state with a Chrome browser if the browser loads a page with many sub resources and then wait a short while followed by a reload. Some of the resources will then stall until the s...A Protocols.HTTP.Server using SSLFile can end up in a bad state with a Chrome browser if the browser loads a page with many sub resources and then wait a short while followed by a reload. Some of the resources will then stall until the server is rebooted. Issue didn't exist in Pike 8.0.Pike 9.0https://git.lysator.liu.se/pikelang/pike/-/issues/8197Sql.Mysql: The index counter is not updated correctly.2020-03-05T17:57:35ZPeter BortasSql.Mysql: The index counter is not updated correctly.Imported from https://youtrack.roxen.com/issue/PIKE-197
Reported by @grubbaImported from https://youtrack.roxen.com/issue/PIKE-197
Reported by @grubbahttps://git.lysator.liu.se/pikelang/pike/-/issues/8196Testsuite sometimes hangs during termination2020-03-10T09:25:01ZPeter BortasTestsuite sometimes hangs during terminationImported from https://youtrack.roxen.com/issue/PIKE-196
Reported by @grubba
The main `test_pike` process waits on the watchdog to die after having closed stdout, but the watchdog has already closed its stdin, so the correspponding clos...Imported from https://youtrack.roxen.com/issue/PIKE-196
Reported by @grubba
The main `test_pike` process waits on the watchdog to die after having closed stdout, but the watchdog has already closed its stdin, so the correspponding close callback will not be triggered.https://git.lysator.liu.se/pikelang/pike/-/issues/8067Consider backporting Inotify add_watch() initialization fix to Pike 8.02020-03-10T09:23:45ZPeter BortasConsider backporting Inotify add_watch() initialization fix to Pike 8.0Imported from https://youtrack.roxen.com/issue/PIKE-67
Reported by Marcus Wellhardh <wellhard@roxen.com>
commit 046e084434a24384350f7c95487c7fc2e0e16550\
Author: Henrik Grubbström (Grubba) <grubba@grubba.org>\
Date: Wed Jun 14 11:59:...Imported from https://youtrack.roxen.com/issue/PIKE-67
Reported by Marcus Wellhardh <wellhard@roxen.com>
commit 046e084434a24384350f7c95487c7fc2e0e16550\
Author: Henrik Grubbström (Grubba) <grubba@grubba.org>\
Date: Wed Jun 14 11:59:04 2017 +0200
Inotify: Improved initialization in add_watch().
Make sure that the backend is woken up after scheduling the
artifical initialization events. Otherwise they may stay
pending indefinitely.
https://git.lysator.liu.se/pikelang/pike/-/issues/8053Improve Search.Database.MySQL performance2020-03-05T17:20:52ZPeter BortasImprove Search.Database.MySQL performanceImported from https://youtrack.roxen.com/issue/PIKE-53
Reported by Martin Karlgren <marty@roxen.com>
Search.Database.MySQL: `get_document_id` and `get_uri_id` make SQL queries for each lookup, and it should be possible to cache that in...Imported from https://youtrack.roxen.com/issue/PIKE-53
Reported by Martin Karlgren <marty@roxen.com>
Search.Database.MySQL: `get_document_id` and `get_uri_id` make SQL queries for each lookup, and it should be possible to cache that in memory. Negative caching is needed too. Cache entries need to be invalidated appropriately when any `remove*` method is called.
Also add a method that accepts an `array(string)` of URI:s to populate the two caches for, which should then read entries batch-wise from the database.
The purpose of these improvements is primarily to improve batch performance, i.e. re-indexing.https://git.lysator.liu.se/pikelang/pike/-/issues/8038Implement Web.Api.ACME module.2022-08-30T14:18:46ZPeter BortasImplement Web.Api.ACME module.Imported from https://youtrack.roxen.com/issue/PIKE-38
Reported by @grubba
Blocking [PIKE-37](#8037), now #8037
ACME defines a RESTful API. cf ACME Draft 7 Section 7.Imported from https://youtrack.roxen.com/issue/PIKE-38
Reported by @grubba
Blocking [PIKE-37](#8037), now #8037
ACME defines a RESTful API. cf ACME Draft 7 Section 7.https://git.lysator.liu.se/pikelang/pike/-/issues/8029The _Stdio testsuite hangs intermittently.2022-11-06T09:35:27ZPeter BortasThe _Stdio testsuite hangs intermittently.Imported from https://youtrack.roxen.com/issue/PIKE-29
Reported by @grubba
Blocking [PIKE-20](#8020), now #8020
````
Doing tests in modules/_Stdio/testsuite (179 tests, pid 4612)
[WATCHDOG]: 00:40:31: Pike testsuite timeout.
[WATCHDOG...Imported from https://youtrack.roxen.com/issue/PIKE-29
Reported by @grubba
Blocking [PIKE-20](#8020), now #8020
````
Doing tests in modules/_Stdio/testsuite (179 tests, pid 4612)
[WATCHDOG]: 00:40:31: Pike testsuite timeout.
[WATCHDOG]: Current test: Test 96 at /net/myst/export/d1/xenofarm/[pike-8](#8008).1/tron.roxen.com/buildtmp/Pike-v8.1-snapshot/src/modules/_Stdio/testsuite.in:319
[WATCHDOG]: 00:40:31: Sending SIGABRT to 4617.
[WATCHDOG]: 01:21:31: Pike testsuite timeout.
[WATCHDOG]: 01:21:31: Sending SIGABRT to 4573.
*** Signal 6 - core dumped
````https://git.lysator.liu.se/pikelang/pike/-/issues/8020Investigate testsuite failures and memory leaks in Pike 8.0/8.1.2022-08-29T17:42:30ZPeter BortasInvestigate testsuite failures and memory leaks in Pike 8.0/8.1.Imported from https://youtrack.roxen.com/issue/PIKE-20
Reported by @grubba
Blocked by [PIKE-21](#8021), now #8021
Blocked by [PIKE-22](#8022), now #8022
Blocked by [PIKE-23](#8023), now #8023
Blocked by [PIKE-24](#8024), now #8024
...Imported from https://youtrack.roxen.com/issue/PIKE-20
Reported by @grubba
Blocked by [PIKE-21](#8021), now #8021
Blocked by [PIKE-22](#8022), now #8022
Blocked by [PIKE-23](#8023), now #8023
Blocked by [PIKE-24](#8024), now #8024
Blocked by [PIKE-25](#8025), now #8025
Blocked by [PIKE-26](#8026), now #8026
Blocked by [PIKE-27](#8027), now #8027
Blocked by [PIKE-28](#8028), now #8028
Blocked by [PIKE-29](#8029), now #8029
Blocked by [PIKE-30](#8030), now #8030
Blocked by [PIKE-31](#8031), now #8031
Blocked by [PIKE-34](#8034), now #8034
The Pike testsuite has intermittent failures, and running it --with-dmalloc shows several leaks and triggers a few crashes.https://git.lysator.liu.se/pikelang/pike/-/issues/8019The Pike.DefaultBackend.enable_core_foundation() API smells.2022-08-30T14:07:54ZPeter BortasThe Pike.DefaultBackend.enable_core_foundation() API smells.Imported from https://youtrack.roxen.com/issue/PIKE-19
Reported by @grubba
Related to [PIKE-15](#8015), now #8015
Why isn't this mode always enabled?
The mode ought to be enabled automatically.Imported from https://youtrack.roxen.com/issue/PIKE-19
Reported by @grubba
Related to [PIKE-15](#8015), now #8015
Why isn't this mode always enabled?
The mode ought to be enabled automatically.https://git.lysator.liu.se/pikelang/pike/-/issues/8016The Inotify accelerated filesystem monitor may lose acceleration in some cases.2020-03-08T13:54:07ZPeter BortasThe Inotify accelerated filesystem monitor may lose acceleration in some cases.Imported from https://youtrack.roxen.com/issue/PIKE-16
Reported by @grubba
The MacOS X Finder is apparently fond of the access pattern when copying files:
```mermaid
graph LR
C1[Create]==>Delete
Delete==>C2[Create]
```
The monito...Imported from https://youtrack.roxen.com/issue/PIKE-16
Reported by @grubba
The MacOS X Finder is apparently fond of the access pattern when copying files:
```mermaid
graph LR
C1[Create]==>Delete
Delete==>C2[Create]
```
The monitor for the resulting file may get lost if the second create comes before the parent directory has been scanned.https://git.lysator.liu.se/pikelang/pike/-/issues/8011wrong variant order can cause exception2022-11-06T11:19:16ZPeter Bortaswrong variant order can cause exceptionImported from https://youtrack.roxen.com/issue/PIKE-11
Reported by KG Sterneberg <kg@roxen.com>
Running the following code:
```
int main(int argc, array(string) argv)
{
array exceptions = ({
Error.mkerror("Ett vanligt fel..."),
...Imported from https://youtrack.roxen.com/issue/PIKE-11
Reported by KG Sterneberg <kg@roxen.com>
Running the following code:
```
int main(int argc, array(string) argv)
{
array exceptions = ({
Error.mkerror("Ett vanligt fel..."),
MyException("Oh no! Something blew up."),
MyError("This is my error"),
"hej hopp gallop",
});
foreach (exceptions, mixed obj) {
handle_error(obj);
}
return 0;
}
variant void handle_error(mixed e) {
werror("Handle an error of unknown type: %O\n", e);
}
variant void handle_error(MyException e) {
werror("Handle an MyException: %s\n", describe_error(e));
}
variant void handle_error(Error.Generic e) {
werror("Handle an Error.Generic: %s\n", describe_error(e));
}
variant void handle_error(MyError e) {
werror("Handle an MyError: %s\n", describe_error(e));
}
class MyException {
inherit Error.Generic;
protected void create(string message) {
::create(message, backtrace());
}
public constant is_my_exception = true;
}
class MyError {
inherit Error.Generic;
protected void create(string message) {
::create(message, backtrace());
}
public constant is_my_error = true;
}
```
results in:
```
>pike exception-test.pike
*Calling undefined function.*
exception-test.pike:27: /main()->handle_error(_static_modules.Builtin()->GenericError("Ett vanligt fel..."))
exception-test.pike:15: /main()->handle_error()
exception-test.pike:10: /main()->main(1,({"/Users/kg/dev/learning/pike/exception-test.pike"}))
```
Just by switching the order of the handle_error variants lite this:
```
variant void handle_error(mixed e) {
werror("Handle an error of unknown type: %O\n", e);
}
variant void handle_error(MyException e) {
werror("Handle an MyException: %s\n", describe_error(e));
}
variant void handle_error(MyError e) {
werror("Handle an MyError: %s\n", describe_error(e));
}
variant void handle_error(Error.Generic e) {
werror("Handle an Error.Generic: %s\n", describe_error(e));
}
```
will make the program work:
```
>pike exception-test.pike
Handle an Error.Generic: Ett vanligt fel...
Handle an MyException: Oh no! Something blew up.
Handle an MyError: This is my error
Handle an error of unknown type: "hej hopp gallop"
```
*This behaviour is dangerous and a potential source of bugs that can be hard do discover.*
P.S. Moving the deklarations of MyException and MyError above the main-function also solves the problem.https://git.lysator.liu.se/pikelang/pike/-/issues/8009Declaration order for nested classes matters - should not!2020-03-23T09:49:57ZPeter BortasDeclaration order for nested classes matters - should not!Imported from https://youtrack.roxen.com/issue/PIKE-9
Reported by KG Sterneberg <kg@roxen.com>
The following code does not work (but it should):
```
int main(int argc, array(string) argv)
{
Outer outer = Outer();
Outer.Nested n = ...Imported from https://youtrack.roxen.com/issue/PIKE-9
Reported by KG Sterneberg <kg@roxen.com>
The following code does not work (but it should):
```
int main(int argc, array(string) argv)
{
Outer outer = Outer();
Outer.Nested n = outer->get_nested();
n->hello_world();
}
class Outer
{
Nested get_nested()
{
return Nested();
}
class Nested
{
void hello_world() { werror("Hello World!\n"); }
}
}
```
Running it:
```
>pike tmp.pike
tmp.pike:4:Indexing on illegal type.
tmp.pike:4:Got : zero.
tmp.pike:4:Index : string(78..116).
tmp.pike:4:Expected constant expression.
Pike: Failed to compile script.
```
Moving "class Outer" above main solves the problem. However the order should not matter!https://git.lysator.liu.se/pikelang/pike/-/issues/8005Image.PS.decode fails on WIN32.2020-03-06T10:51:28ZPeter BortasImage.PS.decode fails on WIN32.Imported from https://youtrack.roxen.com/issue/PIKE-5
Reported by @grubba
REP 6.1.198/Pike 8.0.408:
#### From REPs testsuite
```
Running test C:/disttest/install test/ep_6_1/server-6.1.198/packages/print/test/tests/RoxenTest_rep_imag...Imported from https://youtrack.roxen.com/issue/PIKE-5
Reported by @grubba
REP 6.1.198/Pike 8.0.408:
#### From REPs testsuite
```
Running test C:/disttest/install test/ep_6_1/server-6.1.198/packages/print/test/tests/RoxenTest_rep_imageproc.pike
################ Background failure
Image Processor: Pike Image Processor: image_resize failed to decode ([ /* 3 elements */
"filepath": "C:/disttest/install test/ep_6_1/server-6.1.198/packages/print/test/data/1163486.pdf",
"mimetype": "application/pdf",
"resize": ({ /* 1 element */
([ /* 2 elements */
"filepath": "/tmp/roxentest/output11268.jpg",
"mimetype": "image/jpeg"
])
})
]):
Failed to start process (3).
-:1: _static_modules.Builtin()->create_process()->create(({"/bin/sh -c gs ","-quiet","-sDEVICE=ppmraw","-r100","-dBATCH","-dNOPAUSE","-dUseCIEColor",,,3}),mapping[3])
c:/disttest/install test/ep_6_1/server-6.1.198/pike/lib/modules/_Image_PS.pmod:156: _Image_PS.decode(0,mapping[4])
C:/disttest/install test/ep_6_1/server-6.1.198/packages/imageproc/modules/image-pike.pike (602b93f3):166: RoxenModule(Test REP/image-pike#0)->do_image_resize(mapping[3])
C:/disttest/install test/ep_6_1/server-6.1.198/packages/imageproc/modules/image-pike.pike (602b93f3):126: RoxenModule(Test REP/image-pike#0)->image_resize(mapping[1])
C:/disttest/install test/ep_6_1/server-6.1.198/packages/imageproc/modules/image.pike (3b2788c1):525: RoxenModule(Test REP/image#0)->do_processing(,,,1)
C:/disttest/install test/ep_6_1/server-6.1.198/packages/imageproc/modules/image.pike (3b2788c1):474: RoxenModule(Test REP/image#0)->processor(RoxenModule(Test REP/image#0)->ThreadSafePrioQueue(),0)
| ################ C:/disttest/install test/ep_6_1/server-6.1.198/packages/print/test/tests/RoxenTest_rep_imageproc.pike:36: FAILED
| res
```