-
Notifications
You must be signed in to change notification settings - Fork 31
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
Docs: Add info about dependencies for local development #1375
base: main
Are you sure you want to change the base?
Conversation
Hello! 👋 This repository uses Auto for releasing packages using PR labels. ✨ This PR can be merged. It will not be considered when calculating future versions of the npm packages and will not appear in the changelogs. |
Environment variables are defined in your terminal environment, usually in your profile file, which can be bashrc, zshrc, and many others, or by exporting them before running commands Working with environment variables is a well-known thing in development and IMO we should not be explaining that concept to developers, it'd be close to tell them how to install an editor or IDE, or how to install and open a terminal. Furthermore, there are so many possible variations of how to do it that whatever we write most likely won't fit the case of the person reading, so it is simpler to say "set an environment variable" and let the developer do it its own way. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure i understand the idea behind this document, my main problem is that I don't know what do we mean by "dependency". can you maybe clarify that?
yes, that makes sense! I was almost sure we were talking about plugin depending on other plugins but in the current docs I could not see where it says that. If I skipped it and didn't read it, then maybe we should repeat it a couple times to not put things out of context? It is easy to think of a plugin dependency as a library dependency, or grafana version dependency only |
💯 |
I've made a commit that clarifies that this additional section pertains specifically to plugins that depend on other plugins. Does this address your concerns? Do you see any other changes necessary? |
I left other comments that also require some changes or clarification. |
Co-authored-by: Esteban Beltran <[email protected]>
…y' into josmperez/dependency
Thanks for the thorough review. I've made corrections/changes in response to your comments. Please re-review. |
@@ -439,3 +440,36 @@ Update the `scripts` in the `package.json` to use the extended Webpack configura | |||
-"dev": "webpack -w -c ./.config/webpack/webpack.config.ts --env development", | |||
+"dev": "webpack -w -c ./webpack.config.ts --env development", | |||
``` | |||
## Add a dependency for local development |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
## Add a dependency for local development | |
## Add a plugin as a dependency for local development |
|
||
Grafana’s plugin development environment is designed to allow for plugins to be dependent upon other plugins if necessary. Here’s how it operates: | ||
|
||
Plugin distribution path: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Plugin distribution path: | |
Plugins location directory: |
|
||
Plugin dependency management: | ||
|
||
Although some validations occur on the server side, the plugin path itself doesn't include validation of other plugins your plugin may be dependent upon. You are responsible for ensuring that your plugin's dependencies are correctly managed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This sentence is not clear, I don't really understand what is trying to tell me.
Is it telling me I am responsible of installing the plugin dependencies myself? or is it telling me that I am responsible of putting the dependencies in the correct path? or something else?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks better but, are we somewhere actually putting how to define the dependency in the plugin.json
?
So far what we have tells the user they can define a dependency and (maybe?) they have to install it themselves, but how do they define the dependency?
What's the fix for this? Can you make a suggestion that gives an example please? |
Add info about working with dependencies for local development
Note: I'm aware that there are some ambiguities in the text that need to be resolved.
Fixes # #952