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

fix(tauri): docs.rs build error #3974

Merged
merged 2 commits into from Apr 26, 2022
Merged

fix(tauri): docs.rs build error #3974

merged 2 commits into from Apr 26, 2022

Conversation

lucasfernog
Copy link
Member

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Docs
  • New Binding issue #___
  • Code style update
  • Refactor
  • Build-related changes
  • Other, please describe:

Does this PR introduce a breaking change?

  • Yes, and the changes were approved in issue #___
  • No

Checklist

  • When resolving issues, they are referenced in the PR's title (e.g fix: remove a typo, closes #___, #___)
  • A change file is added if any packages will require a version bump due to this PR per the instructions in the readme.
  • I have added a convincing reason for adding this feature, if necessary

Other information

@lucasfernog lucasfernog requested a review from a team April 26, 2022 20:08
@lucasfernog lucasfernog requested a review from a team as a code owner April 26, 2022 20:08
@FabianLars
Copy link
Sponsor Member

Can we somehow remove ayatana-tray from the default features? disabling it is kinda ugly rn

@lucasfernog
Copy link
Member Author

And force everyone to pick one?

@FabianLars
Copy link
Sponsor Member

yeah i don't know, it's tricky right now. For me on fedora i have to disable the default features and then add 4 feature flags ("wry", "compression", "objc-exception", "gtk-tray") to make it work again.

As a side note we need to update the docs for that asap too (if we leave it as-is).

@lucasfernog
Copy link
Member Author

Disabling it is not that bad:

[dependencies]
tauri = { path = "../../../core/tauri", default-features = false, features = ["wry", "compression", "objc-exception"] }

[features]
default = [ "custom-protocol", "tauri/ayatana-tray" ]
custom-protocol = [ "tauri/custom-protocol" ]
gtk-tray = [ "tauri/gtk-tray" ]

@lucasfernog
Copy link
Member Author

I thought we agreed on having ayatana-tray as a default feature since libappindicator isn't supported on newer distro releases (debian I think).

@FabianLars
Copy link
Sponsor Member

Well maybe my actual problem here is that the tray is generally enabled by default because it never was before (it was only enabled if you had a systray config in tauri.conf.json).

@lucasfernog
Copy link
Member Author

The tray isn't enabled by default. Can you share what's happening in your end?

@FabianLars
Copy link
Sponsor Member

i get a cc linker error because ayatana is a default feature even if i don't have a systemtray configured (ayatana is also listed in the lockfile unless i disable the default features).

you ofc still can't use the actual systray apis because they are behind the system-tray feature flag.

@lucasfernog
Copy link
Member Author

Ahh you're right :/ I don't think we can fix it.

@lucasfernog
Copy link
Member Author

Unless we force the user to pick the feature.

@FabianLars
Copy link
Sponsor Member

FabianLars commented Apr 26, 2022

Yeah i only see 3 shitty alternatives rn:

  • like you said, force the user
  • somehow detect the correct one in the cli (either by checking for fedora or for the lib if that's possible)
  • completely drop libappindicator 🤷

So i guess we leave it as-is for v1 and maybe consider dropping it for v2 since we need to look into changing our build tooling for new webkitgtk versions anyway where we probably end up with custom docker containers or something...

linux really likes to give headaches

@lucasfernog
Copy link
Member Author

Maybe we should leave the choice to the user. Currently everyone will need to have one of the libs installed in their system, even if not using the system tray feature :/ (and we also get easier toggling between gtk/ayatana since no one will need to disable default-features).

@lucasfernog lucasfernog merged commit dd94917 into dev Apr 26, 2022
@lucasfernog lucasfernog deleted the fix/tauri-docs branch April 26, 2022 21:49
dceddia pushed a commit to dceddia/tauri that referenced this pull request May 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants