Skip to content
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

Improve code of BibDataBaseDiff #11355

Merged
merged 7 commits into from
Jun 17, 2024
Merged

Improve code of BibDataBaseDiff #11355

merged 7 commits into from
Jun 17, 2024

Conversation

koppor
Copy link
Member

@koppor koppor commented Jun 3, 2024

Made during thinking of #4877 (but did not work)

Mandatory checks

  • Change in CHANGELOG.md described in a way that is understandable for the average user (if applicable)
  • Tests created for changes (if applicable)
  • Manually tested changed features in running JabRef (always required)
  • Screenshots added in PR description (for UI changes)
  • Checked developer's documentation: Is the information available and up to date? If not, I outlined it in this pull request.
  • Checked documentation: Is the information available and up to date? If not, I created an issue at https://github.com/JabRef/user-documentation/issues or, even better, I submitted a pull request to the documentation repository.

koppor and others added 3 commits June 3, 2024 22:41
Co-authored-by: Carl Christian Snethlage <50491877+calixtus@users.noreply.github.com>
* upstream/Main:
  Disable whole CiteSeer since it does not work as of 2024-05-20 (#11315)
  Improve devdocs for localization (#11356)
  Add documentation for BackgroundTask (and improve code) (#11346)
@Siedlerchr
Copy link
Member

I could stil reproduce it sometimes with the file field, it seems the formatting differs, I have autosve enabled and reformat is disabled. I stored the bib file in nextcloud synced folder. (tested on mac)

see the entries:
test2entries.zip

If you quickly type into the comemnt field some gibberish text and wait it will also trigger the dialog.

@koppor
Copy link
Member Author

koppor commented Jun 8, 2024

I would take a different approach to disable the changes if the file in disk is the saved file.

Reason: Save actions modify the file. That should happen silently...

@Siedlerchr
Copy link
Member

Yes, that seems like a good idea, but isn't the change scanner basically doing this? Except that we compare it with the in memory library

@koppor
Copy link
Member Author

koppor commented Jun 9, 2024

Yes, that seems like a good idea, but isn't the change scanner basically doing this? Except that we compare it with the in memory library

Memory is not equal to disk because of white space removal. File field could be different thing. I don't know yet.

Memory and disk is same for applied save actions, because these propagate back to the memory - but lead to cursor jumping.

@Siedlerchr
Copy link
Member

Memory is not equal to disk because of white space removal. File field could be different thing. I don't know yet.

Another thing related to autosave: Should autosave trigger only when leaving the field?

File field is treated as mulitline field at least in FieldContentFormatter
For file we have FileFieldwriter . however that is directly applied after setting the field

@koppor koppor marked this pull request as ready for review June 17, 2024 20:19
@koppor koppor changed the title Fix "When saving: The libary has been modified by another program" Improve code of BibDataBaseDiff Jun 17, 2024
@koppor koppor added the type: code-quality Issues related to code or architecture decisions label Jun 17, 2024
@Siedlerchr Siedlerchr added this pull request to the merge queue Jun 17, 2024
Copy link
Contributor

github-actions bot commented Jun 17, 2024

The build for this PR is no longer available. Please visit https://builds.jabref.org/main/ for the latest build.

Merged via the queue into main with commit 5c8eb42 Jun 17, 2024
22 checks passed
@Siedlerchr Siedlerchr deleted the fix-4877 branch June 17, 2024 20:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: code-quality Issues related to code or architecture decisions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants