-
Notifications
You must be signed in to change notification settings - Fork 5
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
Feature/optimalize development env #62
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMHO, some parts are a little confusing.
I did not get the chance to test it, but I wonder how it works if I just move a file or a directory. The other situation is when I do the following:
- I make copy of file A outside of the SPipes scripts dirs
- I modify A
- I restore A from backup (I just replace new A with old one from backup)
|
||
LOG.debug("Loading model from {} ...", file.toUri().toString()); | ||
Model model = loadModel(file, lang); | ||
|
||
if (model != null) { | ||
OntoDocManager.addSPINRelevantModel(file.toAbsolutePath().toString(), model); | ||
} | ||
|
||
filesModificationTime.put(file, Instant.now()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am confused here what filesModificationTime
means here. You say it is modification time of a file, but still instead of that you put Instant.now() ... why we are not putting here the actual modification time of the file ?
Moreover, remember that we do not need to track the modification time if keepUpdated=false
.
@@ -154,11 +152,11 @@ private static boolean isFileNameSupported(String fileName) { | |||
return Arrays.stream(SUPPORTED_FILE_EXTENSIONS).anyMatch(ext -> fileName.endsWith("." + ext)); | |||
} | |||
|
|||
private static boolean wasModified(Path fileName){ | |||
private static boolean wasModifiedOrNewlyAdded(Path fileName){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMHO, it is confusing to call something fileName if it represents file path. The file name is referred to as the last part of the file path. I suggest calling it filePath
or even better file
.
There will be NoSuchFileException.
This situation works properly. |
No description provided.