-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🔧 Fix annoying JuliaLS spitting numerous incorrect "missing refs" lints.
- Loading branch information
Showing
10 changed files
with
71 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# JuliaLS incorrectly spits "missing refs" lints wrt generated allometry api identifiers. | ||
# Include this no-op file to fix these lints where needed. | ||
|
||
#! format: off | ||
@static if (false) | ||
include("../AliasingDicts/AliasingDicts.jl") | ||
using .AliasingDicts | ||
(local | ||
AllometricParametersDict, | ||
Allometry, | ||
AllometryDict, | ||
MetabolicClassDict, | ||
parse_allometric_parameter_for_metabolic_class, | ||
parse_allometry_arguments, | ||
parse_metabolic_class_for_allometric_parameter, | ||
|
||
var"") | ||
end | ||
#! format: on |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,58 +1,21 @@ | ||
# Factorize numerous imports useful within the blueprint submodules. | ||
# To be `include`d from these modules. | ||
|
||
include("./macros_keywords.jl") | ||
|
||
# Reassure JuliaLS. | ||
#! format: off | ||
if (false) | ||
(local | ||
Species, _Species, | ||
Foodweb, _Foodweb, | ||
|
||
# Not found for some reason? | ||
MetabolicClassDict, | ||
AliasingError, | ||
|
||
var"") | ||
end | ||
#! format: on | ||
|
||
# TODO: These are mostly useless, except for JuliaLS.. ? :( | ||
using SparseArrays | ||
using EcologicalNetworksDynamics | ||
const EN = EcologicalNetworksDynamics | ||
const F = EcologicalNetworksDynamics.Framework | ||
import EcologicalNetworksDynamics: | ||
AliasingDicts, | ||
Allometry, | ||
BinAdjacency, | ||
Blueprint, | ||
Brought, | ||
EcologicalNetworksDynamics, | ||
F, | ||
Internal, | ||
Internals, | ||
MetabolicClassDict, | ||
SparseMatrix, | ||
SparseVector, | ||
Topologies, | ||
check_template, | ||
imap, | ||
parse_allometry_arguments, | ||
refs, | ||
refspace, | ||
sparse_nodes_allometry, | ||
to_dense_vector, | ||
to_size, | ||
to_sparse_matrix, | ||
to_sparse_vector, | ||
to_template, | ||
@GraphData, | ||
@check_list_refs, | ||
@check_size, | ||
@check_symbol, | ||
@check_template, | ||
@expand_symbol, | ||
@get, | ||
@ref, | ||
@set, | ||
@tographdata | ||
import .F: checkfails, checkrefails, @blueprint | ||
import .AliasingDicts: AliasingError | ||
@ref | ||
import .F: @blueprint, checkfails, Brought, checkrefails | ||
using .EN.AliasingDicts | ||
using .EN.AllometryApi | ||
using .EN.GraphDataInputs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Stupid shenanigans to trick JuliaLS into correctly finding references. | ||
# and not clutter further code with "missing reference" warnings. | ||
# All this code does nothing when actually executed. | ||
# Its sole purpose is to solve these incorrect lints. | ||
|
||
include("./macros_keywords.jl") | ||
|
||
# https://discourse.julialang.org/t/lsp-missing-reference-woes/98231/11?u=iago-lito | ||
@static if (false) | ||
include("../GraphDataInputs/GraphDataInputs.jl") | ||
using .GraphDataInputs | ||
end | ||
|
||
@static if (false) | ||
include("../AliasingDicts/AliasingDicts.jl") | ||
using .AliasingDicts | ||
end | ||
|
||
include("./allometry_identifiers.jl") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters