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

Create plugin add to place plugin in proper directory #193

Closed
Tracked by #230
dtzar opened this issue Jun 8, 2022 · 9 comments
Closed
Tracked by #230

Create plugin add to place plugin in proper directory #193

dtzar opened this issue Jun 8, 2022 · 9 comments
Labels
good first issue Good for newcomers
Milestone

Comments

@dtzar
Copy link
Contributor

dtzar commented Jun 8, 2022

Currently notation plugin only officially supports the list command. It is confusing, error prone, and time consuming for users to have to go lookup what the proper directory is for plugins. Suggestion is to add support for notation plugin add <name> <path-to-local-plugin-file> which automatically creates the proper directory and adds the plugin file there.

@sajayantony
Copy link
Contributor

This might be more challenging for a multi-file plug-in that might be written in Java or .net if the expectation is to copy the plug-in over.

@dtzar
Copy link
Contributor Author

dtzar commented Jun 8, 2022

Expectation would be to copy the file over. It was my understanding that a plugin must be a single executable file - at least that's what I was reading in the code.

@sajayantony
Copy link
Contributor

@gokarnm any inputs on this?

@gokarnm
Copy link
Contributor

gokarnm commented Jun 8, 2022

I agree that expecting users to copy over files to appropriate plugin location is error prone and bad CX. This is not prioritized for RC1 by should be by GA release.
The plugin itself can be a set of files, containing the executable and any dependencies, and is expected to be placed in a sub directory with matching name e.g ~/notation/plugins/com.example.nv2plugin/notation-com.example.nv2plugin.

Something like notation plugin add <name> <path-to-local-plugin-directory> would work better, and does the following

  • Validate that plugin executable exists as per plugin executable naming convention, and has correct permissions
  • Create directory name in plugin base directory
  • Copy all the file in path-to-local-plugin-directory to the plugin sub directory.

We also have a notion of system and user level paths for plugin base dir, so probably will need a switch for it and a default value.

@SteveLasker
Copy link
Contributor

The multi-file thing is a good issue. Perhaps we can pass in a file, or a directory. This behavior did previously exist, but it was single-file based.
It's another good first issue for someone to pickup

@dtzar
Copy link
Contributor Author

dtzar commented Nov 3, 2022

We should also consider an approach similar to Docker plugin.
i.e. notation plugin install <name>

@yizha1 yizha1 modified the milestones: RC-2, Discuss Dec 14, 2022
@Manas23601
Copy link

Can I work on this?

@yizha1
Copy link
Contributor

yizha1 commented Feb 25, 2023

@dtzar Could you confirm it is duplicate of #549, which provides more details and context. Maybe we could close this one and track #549

@dtzar
Copy link
Contributor Author

dtzar commented Mar 1, 2023

Agree 549 is duplicate, solves the problem, and has more detail on a design for implementation than this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
Status: Done
Development

No branches or pull requests

6 participants