subasraj / flashpost-support

Flashpost is a lightweight Rest API Client Extension for Visual Studio Code.
MIT License
10 stars 0 forks source link

Workspace path problem #27

Closed kryopix closed 7 months ago

kryopix commented 7 months ago

Hello,

First and foremost, great job on the Flashpost extension!

I wanted to bring to your attention a couple of issues we've encountered while using the extension in our team environment:

Additionally, here are the settings we've configured in the repository:

"flashpost.saveDataToWorkspace": true,
"flashpost.workspaceDataRelativePath": "tests"

Is there a feasible solution to address these challenges?

Thank you very much for your attention to this matter.

Best regards

subasraj commented 7 months ago

Hi, Where do you see "{"filename":"/home/Username/workspace/tests//Flashpost-tests/flashpost.db", ...} Can you please share some screen shots?

marcoberb commented 7 months ago

I can confirm that the absolute path is inserted into each of the flashpost ".db" files.

Here are my settings:

"flashpost.saveDataToWorkspace": true
kryopix commented 7 months ago

Hi,

Thank you for responding so promptly.

The issue occurs across all files. As shown in the screenshot, the entire path to the file is being saved instead of being relative to the {workspace}. This means that whenever another developer collaborates on the same project and opens Flashpost, they can see the collection and submit requests within it. However, when they attempt to send a request, all files are regenerated in the repository with their home directory path and he have to remove the changes or he has to commit his changes even when they have nothing changed in the request itself.

image

Similarly, if they make changes to a request and link a file from the repository, the file's path within the request is saved with the complete path, including their home directory, rather than being relative to the workspace. Although the file itself exists in the same repository, since they have their own clone of the repository in their home directory, they cannot use the file.

Additionally, I formatted the JSON file with a prettifier to make the section more readable for the screenshot.

image

Thank you for looking into this matter.

subasraj commented 7 months ago

Changing the path is not possible since we use lokijs DB. The work around will be a pre-commit script like below and set a environment varaible for "workspacepath"

precommit.txt