dotnet / dotnet/fsharp

An F# or C# shebang executable should use a cached binary on subsequent runs

Open
#17,217 2 comments 0 reactions 0 assignees View on GitHub
Area-FSI Feature Request
Dominant language
F#
Stars
4.3k
Forks
876
Avg merge
4d 11h
Merged PRs (30d)
131

Description

_This issue has been moved from [a ticket on Developer Community](https://developercommunity.visualstudio.com/t/An-F-or-C-shebang-executable-should-us/10518290)._

---
I wrote [an F# shebang](https://github.com/daveyostcom/showperms/blob/main/showperms/showperms.fsx). It starts up slowly, of course.

It would be good if .NET would provide infrastructure to compile a shebang with AOT (in the background), cache the result, and use the result for subsequent runs. By comparing the shebang file against a hash stored with the cached binary, the system can respond appropriately if the shebang has changed.

Years ago I implemented a version of this technique called “[compileAndGo](https://yost.com/computers/compileAndGo/index.html)”. It works great.

---
### Original Comments

#### Feedback Bot on 11/17/2023, 06:21 AM:

(private comment, text removed)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.