Remove @eval from @RemoteFile macro call #76
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This should fix the way the
@RemoteFile
macro is called inside theget_iers_eop
subfunctions to remove calls to the@eval
macro.The use of
@eval
is not needed since@RemoteFile
has proper macro hygiene and also causes pre-compilation errors when using SatelliteToolbox as dependency and callingget_iers_eop
in another Package, see issue #75.The use of
@eval
was put here probably because@RemoteFile
has two signatures, one that takes a symbol as first argument (used to get the name of the variable name to assign the output to), and another that does not and simply return th output of theRemoteFile
call.Two possible solutions are possible:
@eval
, giving the name_eop_iau2000A
(or_eop_iau1980
) as additional first argument. This may make the code a bit less clear as there is not a visible assignment to the variableRemoteFile
function. This has the drawback that the directory where to download the file (which is automatically computed from the macro) has to be put in the code.I chose the first approach here as it was the one with less friction, but I am willing to change this PR to use the 2nd approach.