Skip to content

Commit

Permalink
Add julia.ado version check
Browse files Browse the repository at this point in the history
  • Loading branch information
droodman committed Dec 7, 2023
1 parent 447a514 commit 5ca8c27
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions reghdfejl.ado
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*! reghdfejl 0.4.2 7 December 2023
*! reghdfejl 0.4.3 7 December 2023

// The MIT License (MIT)
//
Expand Down Expand Up @@ -29,6 +29,8 @@ cap program drop reghdfejl
program define reghdfejl, eclass
version 16

local JLVERSION 0.7.1

if replay() {
if "`e(cmd)'" != "reghdfejl" error 301
if _by() error 190
Expand Down Expand Up @@ -66,7 +68,6 @@ program define reghdfejl, eclass
di as res " `reghdfeado' -> `dest'"
di as res " `r(fn)' -> `reghdfeado'"
}
di as txt "The change will take effect after you restart Stata."
exit 0
}

Expand All @@ -88,6 +89,14 @@ program define reghdfejl, eclass
exit 0
}

jl version
if "`r(version)'" != "`JLVERSION'" {
di as txt "The Stata package julia is not up to date. Attempting to update it with {stata ssc install julia, replace}." _n
ssc install julia, replace
jl version
_assert "`r(version)'"=="`JLVERSION'", msg(Failed to install required version of the julia package.) rc(198)
}

syntax anything [if] [in] [aw pw iw/], [Absorb(string) Robust CLuster(string) vce(string) RESIDuals ITerations(integer 16000) gpu THReads(integer 0) ///
noSAMPle TOLerance(real 1e-8) Level(real `c(level)') NOHEADer NOTABLE compact *]
local sample = "`sample'"==""
Expand Down Expand Up @@ -480,4 +489,5 @@ end
* 0.3.3 Fixed bugs in handling of interactions and constant term
* 0.4.0 Added mask and unmask
* 0.4.1 Properly handle varlists with -/?/*/~
* 0.4.2 Set version minima for some packages
* 0.4.2 Set version minima for some packages
* 0.4.3 Add julia.ado version check

0 comments on commit 5ca8c27

Please sign in to comment.