Skip to content

Commit 94cceca

Browse files
committed
multiemit on net8 hosted
1 parent 8af20d2 commit 94cceca

File tree

2 files changed

+20
-6
lines changed

2 files changed

+20
-6
lines changed

CHANGELOG.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [0.31.0] - 2025-12-19
11+
### Fixed
12+
- Show error line numbers for exceptions in hosted net8 context by using multiemit
13+
1014
## [0.30.1] - 2025-12-19
1115
### Changed
1216
- net472, net8, net9 nuget with suffix, net10 nuget without suffix
@@ -154,7 +158,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
154158
### Added
155159
- first public release
156160

157-
[Unreleased]: https://github.com/goswinr/Fesh/compare/0.30.1...HEAD
161+
[Unreleased]: https://github.com/goswinr/Fesh/compare/0.31.0...HEAD
162+
[0.31.0]: https://github.com/goswinr/Fesh/compare/0.30.1...0.31.0
158163
[0.30.1]: https://github.com/goswinr/Fesh/compare/0.29.3...0.30.1
159164
[0.29.3]: https://github.com/goswinr/Fesh/compare/0.29.2...0.29.3
160165
[0.29.2]: https://github.com/goswinr/Fesh/compare/0.29.0...0.29.2

Src/Config/FsiArguments.fs

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,20 @@ type FsiArguments ( runContext:RunContext) =
1111
let writer = SaveReadWriter(filePath0, IFeshLog.printError)
1212

1313
let defaultArgs =
14-
if runContext.IsHosted then // dec 2024, F# 9, on net48 hosted in Rhino --multiemit- is needed to enable multiple evaluations, line numbers for errors don't work though.
15-
[| "first arg must be there but is ignored" ; "--langversion:preview" ; "--exec"; "--debug+"; "--debug:full" ;"--optimize+" ; "--gui+" ; "--nologo"; "--multiemit-"|]
16-
else // Standalone for net48 too --multiemit is always there on netCore
17-
[| "first arg must be there but is ignored" ; "--langversion:preview" ; "--exec"; "--debug+"; "--debug:full" ;"--optimize+" ; "--gui+" ; "--nologo"; "--multiemit+" |]
18-
14+
[|
15+
"first arg ignored"
16+
"--langversion:preview"
17+
"--exec"
18+
"--debug+"
19+
"--debug:full"
20+
"--optimize+"
21+
"--gui+"
22+
"--nologo"
23+
if runContext.IsHosted && not runContext.IsRunningOnDotNetCore then // dec 2024, F# 9, on net48 hosted in Rhino --multiemit- is needed to enable multiple evaluations, line numbers for errors don't work though.
24+
"--multiemit-"
25+
else
26+
"--multiemit+" // to see line numbers in error messages
27+
|]
1928

2029
// Standalone with "--multiemit" to have line numbers in error messages see https://github.com/dotnet/fsharp/discussions/13293
2130
// Hosted without "--multiemit", error line numbers don't work there anyway, and in addition accessing previously emitted assemblies might fail with a TypeLoadException.

0 commit comments

Comments
 (0)