Skip to content

Consider putting 'go' in the folder name used by 'hover' #209

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

Closed
stuartmorgan-g opened this issue Jul 24, 2019 · 6 comments
Closed

Consider putting 'go' in the folder name used by 'hover' #209

stuartmorgan-g opened this issue Jul 24, 2019 · 6 comments
Labels

Comments

@stuartmorgan-g
Copy link

I noticed that there was a suggestion to upstream a go-flutter-desktop plugin implementation into an existing plugin's repository in a desktop directory. For similar reasons as given here I would recommend that if implementations are going to live in the upstream projects you consider using a more distinctive name (maybe go-desktop or go_desktop?). E.g.:

  • If someone finds a plugin repository containing 'ios', 'android', and 'desktop' directories, will they understand that it doesn't work with flutter.dev/desktop?
  • Similarly, if someone is using go-flutter-desktop, and finds such a plugin, will they understand that that's a Go implementation they can use?
  • If flutter-rs, or a similar project, starts spreading into the ecosystem in the same way, what happens if they decide that desktop is a good name for their implementations?

(Please note that this isn't official guidance or anything of that nature; it's entirely up to you. It just seems like a potential future area of confusion for the ecosystem that could be avoided by changing it early while it's still easy to do so.)

@pchampio
Copy link
Member

pchampio commented Jul 25, 2019

I've updated my comment on #205, as you said, we should make a distinction between embedder project.
I would love to have official guidance because we are not alone in the ecosystem, and sometimes, we make mistakes.

The tool 'hover' creates a desktop directory in the root of the project; if @GeertJohan is ok with a breaking change, go-flutter-desktop/hover#13 should fix the issue.

Again, don't hesitate on posting 'guidance' issue, as they can help us to make the right decisions for the community.

@GeertJohan
Copy link
Member

GeertJohan commented Jul 25, 2019

I would like to give this some more thought, i'm affraid things can still be confusing with go-desktop as well. I'm not sure though what would be better.. Just go or perhaps hover. I'm convinced by Stuart's arguments that desktop can be confusing, just would like to give this some more thoughtbefore doing the beaking change.

@stuartmorgan-g
Copy link
Author

Apologies if the title caused confusion; I was assuming that hover would be expecting Go plugin implementations to be in a desktop folder, rather than that just being a convention.

@GeertJohan
Copy link
Member

GeertJohan commented Aug 16, 2019

Running hover init in an app repo creates the folder desktop with boilerplate Go code for a go-flutter-based application. Just like flutter create creates the folders android and ios with their boilerplate code/config. The current behavior of hover does not conflict with macos/linux/windows, but it also doesn't make clear that the folder concerns go-flutter / hover code.

It would be nice if hover could detect and automatically link go-flutter-compatible plugins. This would be done by detecting a folder in the repository of a plugin. I would expect the folder name of native plugin code to be the same as the folder for application code (currently desktop). Just like with android/ios/macos/windows/linux.

desktop is currently being used in a lot of projects (but no plugins yet), changing the folder name in hover will cause a breaking change. (We could ask the user if they want us to rename desktop to $newName.)

I understand that the name is a bit confusing, but that goes both ways. macos, linux and windows are 'claimed' by FDE / Flutter, but we've already had questions about those setups in this project. Probably it's more important to have the repositories explain how they are built. Both hover and flutter could add README files that explain what a folder is for and how it is used. Would it then really hurt if go-flutter / hover claims desktop?

On the other hand, go-flutter can be used for non-desktop as well, the name 'desktop' may even be confusing for projects that use go-flutter on embedded devices / touchscreens, which don't really classify as 'desktop'.

How about simply go? It's not really a platform, but it seems to fit? We could still add that README file that explains what the folder is for and points to hover.build and/or wiki.

Example import statements:

package main

import (
    file_picker "github.com/username/file_picker/go"
    device_info "github.com/flutter/plugins/packages/device_info/go"
)

Thoughts? @Drakirus @stuartmorgan

@pchampio
Copy link
Member

pchampio commented Aug 16, 2019

I like go, it matches flutter-rs where they use rust for the directory name.

@pchampio
Copy link
Member

fixed by go-flutter-desktop/hover#12

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

No branches or pull requests

3 participants