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

dev-live-reload not working for user-created theme on linux #1111

Open
5 tasks done
sogaiu opened this issue Oct 16, 2024 · 0 comments
Open
5 tasks done

dev-live-reload not working for user-created theme on linux #1111

sogaiu opened this issue Oct 16, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@sogaiu
Copy link

sogaiu commented Oct 16, 2024

Thanks in advance for your bug report!

  • Have you reproduced issue in safe mode?
  • Have you used the debugging guide to try to resolve the issue?
  • Have you checked our FAQs to make sure your question isn't answered there?
  • Have you checked to make sure your issue does not already exist?
  • Have you checked you are on the latest release of Pulsar?

What happened?

I was following the Creating a syntax theme instructions (with some slight modifications as one of the referenced files no longer exists) and I encountered this paragraph:

You can avoid reloading to see changes you make by opening an Pulsar window in Dev Mode. To open a Dev Mode Pulsar window, run pulsar --dev . in the terminal or use the View > Developer > Open in Dev Mode menu. When you edit your theme, changes will instantly be reflected!

I tried to follow those steps but did not meet with success on two Linux distributions (Void Linux and Xubuntu). It did work on Windows 10, however.

Pulsar version

1.121.0

Which OS does this happen on?

🐧 Debian based (Linux Mint, Ubuntu, etc.)

OS details

Xubuntu 24.04.1

Which CPU architecture are you running this on?

x86_64/AMD64

What steps are needed to reproduce this?

  1. On Xubuntu 24.04.1 (this was actually a qemu guest VM running on top of an Intel x86_64 machine), install Pulsar via this .deb. After downloading, I used sudo dpkg -i Linux.pulsar_1.121.0_amd64.deb and followed the prompts.
  2. Launch pulsar.
  3. Bring up the command palette and execute the Package Generator: Generate Syntax Theme command.
  4. Choose a path (I chose /home/user/src/motify-syntax) and press the Enter key and wait for the dialog to go away.
  5. Exit pulsar, cd ~/src/motify-syntax and start pulsar in dev mode via pulsar --dev ..
  6. Bring up settings via Ctrl+, and choose the Themes tab.
  7. Select Motif as the Syntax Theme and wait for the theme to be reflected (I noticed a slight change in color).
  8. Open the motif-syntax/styles/editor.less file via the tree view.
  9. Locate the line beginning .gutter (line 19 in my case), duplicate the line below it that starts background-color: and comment the line out.
  10. Modify the uncommented version of the line to be background-color: @red;.
  11. Save the file.
  12. Observe that the gutter's color has not changed.

Additional Information:

The last step above (step 12), is the one with an unexpected outcome. The expected outcome was to see the gutter color change.

By manually executing the Window: Reload command and waiting, I was able to observe that the gutter's color had changed.

Also, step 12 on Windows 10 resulted in a different outcome. Expectations were met, i.e. the gutter color did change there.


The following two messages were noticed via the Developer Tools console:

/home/user/src/pulsar/node_modules/pathwatcher/lib/main.js:91 The handle(2) returned by watching /home/user/.pulsar/packages/motif-syntax/styles is the same with an already watched path(/home/user/src/motif-syntax/styles)
HandleWatcher.start @ /home/user/src/pulsar/node_modules/pathwatcher/lib/main.js:91

/home/user/src/pulsar/node_modules/pathwatcher/lib/main.js:91 The handle(1) returned by watching /home/user/.pulsar/packages/motif-syntax/styles/editor.less is the same with an already watched path(/home/user/src/motif-syntax/styles/editor.less)
HandleWatcher.start @ /home/user/src/pulsar/node_modules/pathwatcher/lib/main.js:91

Note the mention of pathwatcher.

I retried following the steps above except invoking pulsar --dev . from ~/.pulsar/packages/motif-syntax instead and didn't encounter the issue (i.e. gutter color did change upon saving).

It seems possible that symlinks might have something to do with this situation.

AFAIU, pathwatcher has native bits (not sure if that's an appropriate link).

There are pathwatcher_*.cc files for linux, unix, and windows so perhaps differences in behavior may be partly due to differences in implementation.

P.S. I failed to determine how to reproduce this issue using safe mode, but I didn't know how to successfully submit this issue without checking the checkbox (^^;

@sogaiu sogaiu added the bug Something isn't working label Oct 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant