fsharp icon indicating copy to clipboard operation
fsharp copied to clipboard

Tests/parser: use test source

Open auduchinok opened this issue 3 years ago • 4 comments

An experiment with in-memory setting a test source that is used for parsing.

The current approach seems to rely on writing a file into temp directory and then trying to read it. It have never worked for me during debug. We could try to fix that, but not writing it to disk seems a better thing to do.

auduchinok avatar Jun 28 '22 15:06 auduchinok

It wasn't writing it to disk before either: https://github.com/dotnet/fsharp/blob/ddbaafd3533d7c2bc1fe8265938450fef4c6ad93/tests/service/Common.fs#L197

Which is probably the reason it didn't work for you during debug, because Range.DebugCode relies on reading it from disk.

I don't like that this seems to be adding another obstacle to eventually being able to run tests in parallel.

0101 avatar Oct 21 '22 09:10 0101

It wasn't writing it to disk before either:

https://github.com/dotnet/fsharp/blob/ddbaafd3533d7c2bc1fe8265938450fef4c6ad93/tests/service/Common.fs#L197

Which is probably the reason it didn't work for you during debug, because Range.DebugCode relies on reading it from disk.

I don't like that this seems to be adding another obstacle to eventually being able to run tests in parallel.

If/Once we are ready for parallelism, the storage could be turned into an (WeakMap option), keyed by randomly generated filename per test case. ?

T-Gro avatar Oct 21 '22 09:10 T-Gro

Hey @auduchinok, is this still something of your interest?

psfinaki avatar Jan 16 '24 15:01 psfinaki

:heavy_exclamation_mark: Release notes required

@auduchinok,

[!CAUTION] No release notes found for the changed paths (see table below).

Please make sure to add an entry with an informative description of the change as well as link to this pull request, issue and language suggestion if applicable. Release notes for this repository are based on Keep A Changelog format.

The following format is recommended for this repository:

* <Informative description>. ([PR #XXXXX](https://github.com/dotnet/fsharp/pull/XXXXX))

See examples in the files, listed in the table below or in th full documentation at https://fsharp.github.io/fsharp-compiler-docs/release-notes/About.html.

If you believe that release notes are not necessary for this PR, please add NO_RELEASE_NOTES label to the pull request.

You can open this PR in browser to add release notes: open in github.dev

Change path Release notes path Description
src/Compiler docs/release-notes/.FSharp.Compiler.Service/8.0.300.md No release notes found or release notes format is not correct

github-actions[bot] avatar Jan 16 '24 15:01 github-actions[bot]

[!CAUTION] Repository is on lockdown for maintenance, all merges are on hold.

github-actions[bot] avatar Mar 07 '24 11:03 github-actions[bot]

Doing clean up in PRs - please reopen if you deem appropriate

abonie avatar Aug 12 '24 16:08 abonie