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

1.6 breaks plugin #145

Closed
Wildphinn opened this issue May 10, 2024 · 4 comments
Closed

1.6 breaks plugin #145

Wildphinn opened this issue May 10, 2024 · 4 comments

Comments

@Wildphinn
Copy link

Apparently some classes were deprecated with the introduction of Obsidian 1.6, breaking the plugin. I dearly hope it’s fixable!
best of luck and thank you for your work.

@SebastianMC
Copy link
Owner

In Obsidian 1.6.0 they deprecated the global field app which was holding the instance of App class. They stated this in the official Release notes. Refactoring to accommodate to this specific change was easy - the handle to App can be easily acquired via other means.

A side note: despite hiding it from the official API, the global handle still exists in underlying implementation of Obsidian. This will help in backward compatibility of some plugins which don't manage to update in time

Unfortunately, the actual reason which breaks the custom-sort plugin is yet another significant refactoring of the internal mechanics of file explorer introduced in Obsidian 1.6.0. A round of reverse engineering revealed some breaking changes in the sorting logic, which prevent the plugin integration point from working correctly. Fixing the custom-sort is feasible, it is about changing the integration point with Obsidian. At the same time it is tricky and requires a fresh head and a significant amount of time. Hopefully I can manage to find such a timeslot until some official 1.6.x Obsidian is released.

Such approach of Obsidian isn't friendly for plugins, especially in the light of the plugin-based ecosystem, which I assumed Obsidian to be.

@Wildphinn
Copy link
Author

Totally agreed – I feel your pain. I know you had to adapt to one such breaking change recently in the past, did the work, and now you have to face yet another overhaul, which is decidedly not great.

I cannot help with development as I know nothing about JS, but if you need an Insider license to access beta builds, I'd be happy to donate one as I love your work and rely heavily on it.

SebastianMC added a commit that referenced this issue May 13, 2024
…nvocation and wrapper(s) to work under Obsidian 1.6.0 (which introduced significant refactoring)

Remains to do:
- polish the code to remove duplication in main.js
- full testing under 1.6.0
- regression tests under latest 1.5.x (the code is backward compatible)
@SebastianMC
Copy link
Owner

Hi @Wildphinn

(re)approached it with fresh head and done!
Please update to 2.1.9 and test.

@Wildphinn
Copy link
Author

Already updated and tested! Everything seems to be working fine. Thanks for doing it so quickly, you rock!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants