HexmosTech / Lama2

Free, Lightweight & Collaborative API Client
https://hexmos.com/lama2/index.html
GNU Affero General Public License v3.0
109 stars 6 forks source link

Global variable support and Generate env JSON option #24

Closed lovestaco closed 1 year ago

lovestaco commented 1 year ago

What type of MR is this?

Description

This MR adds the feature of supporting global variables. Edit1:

Edit2:

Important code file to start Code Review from

controller.go

Added tests?

Added to documentation?

shrsv commented 1 year ago

After every documentation change - we are supposed to run the following and commit all resultant files:

mkdocs:
    cd docs/Lama2; ./build.sh

Anyway - wait till my overall review finishes, then you can do this.

shrsv commented 1 year ago

Remaining comments - I think we still do not have functionality for obtaining the variable suggestions from VSCode (using some CLI switch - pls make proposals). That can be added to this MR itself.

shrsv commented 1 year ago

In general - nice first MR :+1:

shrsv commented 1 year ago

Also - we must add test case(s) for this new logic.

shrsv commented 1 year ago
L2 can now fetch variables declared in l2config.env which can be in the parent directory.

L2 will first fetch the variables from the l2config.env which can be in the parent directory and
then fetch the variables from l2.env from the present dir.

The description has to be more precise.

  1. l2config.env is searched for, from the present directory to all its ancestors (upto /). Yes, a directory may have both l2.env AND l2config.env (make sure this is so)
shrsv commented 1 year ago

Also - we must add test case(s) for this new logic.

This has not been addressed @lovestaco

lovestaco commented 1 year ago

Also - we must add test case(s) for this new logic.

This has not been addressed @lovestaco

https://github.com/HexmosTech/Lama2/blob/globalvar-l2configenv/elfparser/ElfTestSuite/root_variable_override