finos / kdb-studio

Studio for kdb+ / Rapid execution environment for q
Apache License 2.0
18 stars 12 forks source link

Reapply #75

Closed gyorokpeter closed 2 years ago

gyorokpeter commented 2 years ago

THE FOLLOWING DISCLAIMER APPLIES TO ALL SOFTWARE CODE AND OTHER MATERIALS CONTRIBUTED IN CONNECTION WITH THIS SOFTWARE: THIS SOFTWARE IS LICENSED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE AND ANY WARRANTY OF NON-INFRINGEMENT, ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. THIS SOFTWARE MAY BE REDISTRIBUTED TO OTHERS ONLY BY EFFECTIVELY USING THIS OR ANOTHER EQUIVALENT DISCLAIMER IN ADDITION TO ANY OTHER REQUIRED LICENSE TERMS. ONLY THE SOFTWARE CODE AND OTHER MATERIALS CONTRIBUTED IN CONNECTION WITH THIS SOFTWARE, IF ANY, THAT ARE ATTACHED TO (OR OTHERWISE ACCOMPANY) THIS SUBMISSION (AND ORDINARY COURSE CONTRIBUTIONS OF FUTURES PATCHES THERETO) ARE TO BE CONSIDERED A CONTRIBUTION. NO OTHER SOFTWARE CODE OR MATERIALS ARE A CONTRIBUTION.

linux-foundation-easycla[bot] commented 2 years ago

CLA Signed

The committers are authorized under a signed CLA.

dzmipt commented 2 years ago

Can you please elaborate what clash you mean? It seems to be OK to have structure like

EnvA/rdb/stock EnvB/rdb/stock

вт, 1 мар. 2022 г., 19:08 gyorokpeter @.***>:

@.**** commented on this pull request.

In src/main/studio/kdb/Config.java https://github.com/finos/kdb-studio/pull/75#discussion_r816916539:

@@ -435,6 +438,148 @@ public void save() { } }

  • public Object serverTreeToObj(ServerTreeNode root) {
  • //converts the server tree to an object that can be saved into JSON
  • LinkedHashMap<String,Object> result = new LinkedHashMap<>();
  • result.put("name", root.getName());

In fact server names should be unique otherwise there is a chance that there will be a clash when moving them under the same parent. There was already a feature request to enforce this which I didn't get around to implement yet but looks like I will have to do it now.

— Reply to this email directly, view it on GitHub https://github.com/finos/kdb-studio/pull/75#discussion_r816916539, or unsubscribe https://github.com/notifications/unsubscribe-auth/AG76OVXZBQEZ6SDQY2JYIRDU5Y6GBANCNFSM5OYKFZDQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you commented.Message ID: @.***>

gyorokpeter commented 2 years ago

If you were to pick up the first "rdb" and and drop it into the "EnvB/rdb" folder you would end up with a clash. The fact that there is no validation for duplicate server names is already causing problems for some users even without the server tree or export feature (see #22 ) so implementing that seems to be the best solution.