Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warning display problems #3679

Closed
vicuna opened this issue Jun 8, 2005 · 4 comments
Closed

Warning display problems #3679

vicuna opened this issue Jun 8, 2005 · 4 comments
Assignees
Labels
Milestone

Comments

@vicuna
Copy link

vicuna commented Jun 8, 2005

Original bug ID: 3679
Reporter: administrator
Assigned to: @lefessan
Status: closed (set by @xavierleroy on 2015-12-11T18:19:37Z)
Resolution: fixed
Priority: normal
Severity: text
Target version: 4.00.2+dev
Fixed in version: 4.01.0+dev
Category: ~DO NOT USE (was: OCaml general)

Bug description

Full_Name: Robert Roessler
Version: 3.08.3
OS: Windows XP SP2
Submission from: adsl-63-194-18-166.dsl.lsan03.pacbell.net (63.194.18.166)

When OCaml is displaying warnings involving non-specific context, i.e., an
entire expression rather than a single line followed by a line with a '^', it
seems to display the expression with a trailing ".." string.

(* trivial example *)
match 0 with
| 0 -> 0
;;

gives (on STDERR):
Characters 0-21:
Warning: this pattern-matching is not exhaustive.
Here is an example of a value that is not matched:
1

gives (on STDOUT):
match 0 with
| 0 -> 0..

I have observed two situations where this does NOT happen:

  1. if there is any whitespace (space, tab, comment AFTER one or more
    line-terminators) following the end of the expression, then the ".." is
    suppressed

(* "suppressed" example )
match 0 with
| 0 -> 0
(
x *)
;;

gives (on STDOUT):
match 0 with
| 0 -> 0

  1. if there is any whitespace (space, tab, comment BEFORE the line terminator)
    following the end of the expression, then the ".." sequence is lengthened

(* "lengthened" example )
match 0 with
| 0 -> 0 (
x *)
;;

gives (on STDOUT):
match 0 with
| 0 -> 0..........

Note that the number of '.' chars appears to equal the TOTAL number of
whitespace chars + 2.

@vicuna
Copy link
Author

vicuna commented Aug 4, 2005

Comment author: administrator

CRLF problem?

@vicuna
Copy link
Author

vicuna commented Dec 15, 2005

Comment author: @damiendoligez

probably a binary IO vs text IO problem

@vicuna
Copy link
Author

vicuna commented Jun 12, 2013

Comment author: @lefessan

Fixed by commit 13767 in SVN trunk.

@vicuna
Copy link
Author

vicuna commented Jun 12, 2013

Comment author: @lefessan

All chars before and after the location are replaced by dots. Actually, the only bug is that '\r' should probably not be replaced by a dot, as it is not really visible.

@vicuna vicuna closed this as completed Dec 11, 2015
@vicuna vicuna added this to the 4.00.2 milestone Mar 14, 2019
@vicuna vicuna added the bug label Mar 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants