From 5ca8c27ab2411f088e402d1f2f4427cab9bfd12a Mon Sep 17 00:00:00 2001 From: droodman Date: Thu, 7 Dec 2023 12:29:55 -0500 Subject: [PATCH] Add julia.ado version check --- reghdfejl.ado | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/reghdfejl.ado b/reghdfejl.ado index 2d067c4..fa85860 100644 --- a/reghdfejl.ado +++ b/reghdfejl.ado @@ -1,4 +1,4 @@ -*! reghdfejl 0.4.2 7 December 2023 +*! reghdfejl 0.4.3 7 December 2023 // The MIT License (MIT) // @@ -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 @@ -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 } @@ -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'"=="" @@ -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 \ No newline at end of file +* 0.4.2 Set version minima for some packages +* 0.4.3 Add julia.ado version check