-
Notifications
You must be signed in to change notification settings - Fork 109
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Whenever I edit a file Revise thinks I changed a struct definition #772
Comments
Dup of #734 P.S.: I am doing |
I can't test this explicit issue (what is What I really, really need is a self-contained MWE that replicates the issue. |
I don't really have time to set-up a test package and verify that this is a MWE but here is the contents of the file up to the problematic class definition ( export
DistanceConstraint,
NoSystemConstraints,
n_dof
"""
Supertype for all constraint algorithms.
"""
abstract type ConstraintAlgorithm end
abstract type PositionConstraintAlgorithm <: ConstraintAlgorithm end
abstract type PositionAndVelocityConstraintAlgorithm <: ConstraintAlgorithm end
ConstrainsPositions = Union{PositionConstraintAlgorithm, PositionAndVelocityConstraintAlgorithm}
"""
Placeholder struct for [`System`](@ref) constructor when the system does not require constraints.
An example of a constraint algorithm is [`SHAKE`](@ref).
"""
struct NoSystemConstraints <: ConstraintAlgorithm end
"""
Supertype for all types of constraint.
"""
abstract type Constraint end
"""
Constraint between two atoms that maintains the distance between the two atoms.
# Arguments
- `atom_idxs::SVector{Int}` : The indices of atoms in the system participating in this constraint
- `dist::D` : Euclidean distance between the two atoms.
"""
struct DistanceConstraint{D} <: Constraint
atom_idxs::SVector{2,<:Integer}
dist::D
end
"""
Atoms in a cluster do not participate in any other constraints outside of that cluster.
"Small" clusters contain at most 4 bonds between 2,3,4 or 5 atoms around one central atom.
Small clusters include: 1 bond, 2 bonds, 1 angle, 3 bonds, 1 bond 1 angle, 4 bonds
Note that an angle constraints will be implemented as 3 distance constraints. These constraints
use special methods that improve computational performance. Any constraint not listed above
will come at a performance penatly.
"""
struct ConstraintCluster{N}
constraints::SVector{N,<:Constraint}
end |
I have the following class defined in a file:
whenever I edit anything in this file Revise throws and error saying that I modified this struct and force me to restart the Julia instance. I have no idea why this is happening and its making development extremely painful. If anyone could help me diagnose the issue that would be great.
Error:
The text was updated successfully, but these errors were encountered: