-
Notifications
You must be signed in to change notification settings - Fork 673
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
foam.foam-vscode breaks vsls-contrib.gitdoc; requires GitDoc Enable/Disable/Enable command sequence on every new session to function. #1419
Comments
Cross-posted with lostintangent/gitdoc#88. |
First of all thanks for the thorough description of the bug @AJMansfield Looking at the release log, in October of last year we started the work to make Foam a web extension - again I don't believe this should interfere with gitdoc. I am not seeing anything on their release log that would hint at a conflict either.. Let's see also if @lostintangent has any thoughts about the issue. |
Apologies for the red herring! I just dug through my git history again, looking for commits that might indirectly represent this issue -- i.e. a large set of changes piling up without me noticing the lack of auto-commits, getting committed all at once -- and I've found several that are much earlier than this. October 26th is a date I have evidence I was trying to troubleshoot this issue, but I've got commits that show the expected symptoms on August 26 (from changes accumulated after August 12), and also maybe another July 24 (from everything after July 15). There's also commits that look a bit similar even earlier, e.g. one May 10, one February 12; but those lack the large time gaps to their next ancestor and it's difficult to disentangle that far back, what was a software issue vs config/workflow issue vs actual large change thanks to different migrations I was doing at that point. |
I am experiencing the same behavior as well. |
Describe the bug
Some time before August 2024, GitDoc started to behave strangely with regards to its enable/disable status. Each time I launch VSCode, the extension appears to start disabled (despite configurations that should enable it), and only becomes functional after running commands to enable, disable, and then re-enable it a second time.
I've isolated this issue to an interaction specifically with the Foam extension. Disabling
foam.foam-vscode
completely resolves these symptoms, and re-enabling it brings them back, even when there are no other extensions other than it andvsls-contrib.gitdoc
. This exact set of symptoms occurs across both of the computers and in both of the workspaces I regularly use these extensions on.Enable/Disable Stateful Behavior
For the sake of being fully explicit, there seem to be four different system states involved, which I'll label State A through State D:
State A is the proper enabled and running state. The book icon is visible in the bottom bar whenever I have a file open that it's configured to operate on, auto-commits are created automatically when files are changed, and the
GitDoc: Disable
andGitDoc: Commit
commands are visible in the command palette. If I close VSCode, then start VSCode, I expect it to re-open in State A; however, it instead launches in what I'm labeled State B.State B appears to be a disabled state. GitDoc is not running, no book icon is visible, no auto-commits are created, and only the
GitDoc: Enable
command is visible in the palette. RunningGitDoc: Enable
transitions the system to State C (not to State A).State C is a sort of pseudo-enabled state. The book icon is not visible on any configured file, and commits are not created automatically when files are changed, but he
GitDoc: Disable
andGitDoc: Commit
commands are visible in the palette andGitDoc: Enable
is not. RunningGitDoc: Commit
does successfully create a commit, but leaves the system in State C. RunningGitDoc: Disable
transitions the system to State D.State D is also a 'disabled' state, with the same visible symptoms as State B, except that running
GitDoc: Enable
transitions the system to the (desired) State A (not to State C).Steps to Reproduce the Bug or Issue
With
vsls-contrib.gitdoc
as the only enabled extension,foam.foam-vscode
disabled, and settings set to include"gitdoc.enabled": true
as a config key, closed VSCode and launch VSCode. Observe that the system is immediately in State A after launch, without any further intervention.Re-enable
foam.foam-vscode
. Close VSCode and launch VSCode. Observe State B described above. Issue theGitDoc: Enable
command. Observe State C. Issue theGitDoc: Disable
command. Observe State D. Issue theGitDoc: Enable
command. Observe State A.Expected behavior
I expect that GitDoc should function consistently and launch as configured immediately to State A, regardless of Foam's presence or configuration.
Operating System Version
Windows 10; Windows 11
Visual Studio Code Version
1.96.2
Additional context
Workspace Configuration
My workspace configures Foam and GitDoc via config keys in the
.vscode/settings.json
file located relative to the workspace root, the relevant lines of which are:The last two lines were added recently as another attempts to try to resolve it this issue; but the problem occurs regardless of whether those values are inherited from the defaults or specified explicitly in the workspace settings.
This workspace root is also the git repository root; with these settings captured as part of the version control for this repository.
No extensions other than
foam.foam-vscode
,vsls-contrib.gitdoc
, and the defaultvscode.*
extensions are installed and enabled.Software Versions
VSCode About
GitDoc Installation Info
Foam Installation Info
Extension Host Logs
Here's the Extension Host logs for each of these states.
Starting in State B, I get:
No additional log entries appear when running any of the commands that transition the issue into one of the other states.
The text was updated successfully, but these errors were encountered: