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

Always print tests output relative to import/gnucobol/ #28

Merged
merged 1 commit into from
Sep 28, 2023

Conversation

lefessan
Copy link
Member

No description provided.

let rec iter path =
match path with
| [] -> s
| "import" :: "gnucobol" :: _ -> String.concat "/" path
Copy link
Collaborator

@nberth nberth Sep 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While you're at it, why not strip the import altogether?

Also ppf stands for pretty-printing-formatter (I think). fmt is the old-school name, that unfortunately can be mistaken for "format(-string)".

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok for ppf. For import, I don't want to match only on gnucobol, as it may appear above the source directory...

@lefessan lefessan force-pushed the z-2023-09-28-rebase-Considering branch from 904c45c to 0483385 Compare September 28, 2023 15:13
SuperBOL includes superbol-studio-oss as a sub-module, so we have to
make our tests as "relocatable" as possible.
@lefessan lefessan force-pushed the z-2023-09-28-rebase-Considering branch from 0483385 to 2b9c53e Compare September 28, 2023 15:16
@lefessan lefessan merged commit 20f0eb4 into OCamlPro:master Sep 28, 2023
3 checks passed
@lefessan lefessan deleted the z-2023-09-28-rebase-Considering branch September 28, 2023 17:21
@@ -401,10 +401,10 @@ let%expect_test "formatting-request-whole-program" =
end_with_postproc [%expect.output];
[%expect {|
{"params":{"diagnostics":[],"uri":"file://__rootdir__/superbol.toml"},"method":"textDocument/publishDiagnostics","jsonrpc":"2.0"}
src/lsp/cobol_ast/raw_misc_sections_visitor.ml:66:
raw_misc_sections_visitor.ml:0:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lefessan What was the problem of having precise source locations here?
To me the occasional need for an auto-promotion does not warrant the ugly hack used in this PR to remove the info.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These locations are very handy when implementing the partial visitors, even and in particular in the tests.

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.

2 participants