Skip to content

Remove redundant conditional in julia-launcher#19

Open
PranavGadge01 wants to merge 1 commit intomgubi:mainfrom
PranavGadge01:fix-julia-launcher-bug
Open

Remove redundant conditional in julia-launcher#19
PranavGadge01 wants to merge 1 commit intomgubi:mainfrom
PranavGadge01:fix-julia-launcher-bug

Conversation

@PranavGadge01
Copy link
Copy Markdown

Problem

The julia-launcher function in progs/init-julia.scm contained
an if/else where both branches produced identical output:

(define (julia-launcher)
  (with boot (raw-quote (julia-entry))
    (if (url-exists-in-path? "julia")
        (string-append "julia " boot)
        (string-append "julia " boot))))  ; <- identical to true branch

This conditional is dead code — it never influences the return value
regardless of whether Julia is found or not.

Additionally, the false branch is structurally unreachable. The
:require (url-exists-in-path? "julia") clause in plugin-configure
runs before the launcher is ever invoked. If Julia is absent from PATH,
TeXmacs disables the plugin entirely at that point and never calls
julia-launcher.

Fix

Simplify julia-launcher to a single expression:

(define (julia-launcher)
  (with boot (raw-quote (julia-entry))
    (string-append "julia " boot)))

Impact

No runtime behaviour change. This is a code clarity fix — the
previous code falsely implied error handling logic was present
when it was not.

@PranavGadge01
Copy link
Copy Markdown
Author

@hammerfunctor could u please check...

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.

1 participant