Skip to content

Conversation

@xelxebar
Copy link

Fixes #94

@xelxebar xelxebar changed the title Fix #94. Ignore expected FIFO exception in tests Draft: Fix #94. Ignore expected FIFO exception in tests May 30, 2025
@xelxebar xelxebar force-pushed the push-xnwnyqrootqq branch from 6b618b1 to eb7997f Compare May 30, 2025 15:23
@xelxebar xelxebar changed the title Draft: Fix #94. Ignore expected FIFO exception in tests Fix #94. Ignore expected FIFO exception in tests May 30, 2025
@Seeker04
Copy link
Owner

This does not solve the exception output.

Issues I see:

  • ignore/1 can suppress predicate failures (i.e. it succeeds even if the wrapped call fails), not exceptions
  • also, it must wrap a predicate call, i.e. fifo:process_fifo(FifoPath) in this case, not the detached in the Options list
  • catch/3 is the one to use for suppressing exceptions by catch(Goal, _, true)

Also, I realized, the exception I see is not the same you originally reported.

I wrote an assessment at the issue.

@xelxebar xelxebar force-pushed the push-xnwnyqrootqq branch from eb7997f to ead0b70 Compare May 30, 2025 23:03
@xelxebar
Copy link
Author

xelxebar commented May 30, 2025

Hrm. I originally had wrapped fifo:process_fifo/1 in ignore/1 but still saw the warning. Wrapping detached(true) in desperation caused the warning to disappear. What do you think is going on there? Maybe ignore(detached(true)) fails to unify against detached(true), so thread_create/3 never "thread prints a message using print_message/2" as mentioned in the docs?

Anyway, I updated with a universal catch/3 wrap as you suggest. Cheers!

@xelxebar xelxebar force-pushed the push-xnwnyqrootqq branch from ead0b70 to c2afd7e Compare May 30, 2025 23:35
@Seeker04
Copy link
Owner

Sorry, I only brought up catch/3 to say it's the proper solution to handle exceptions in general, opposed to ignore/1 which is for failures.

I'm not yet sure suppressing an exception here is warranted.

Warning: [Thread 4] Thread running "fifo:process_fifo("/tmp/test-fifo")" died on exception: open/3: source_sink `"/tmp/test-fifo"' does not exist (No such file or directory)

This does not occur with the Docker build, nor on my machine.

I commented a few things to check at the issue. Could you please have a look at those?

@xelxebar
Copy link
Author

xelxebar commented Jun 1, 2025

#101 or related should obviate this.

@xelxebar xelxebar closed this Jun 1, 2025
@xelxebar xelxebar deleted the push-xnwnyqrootqq branch June 1, 2025 18:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fifo exception warning in test output

2 participants