-
Notifications
You must be signed in to change notification settings - Fork 676
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
Parse envFile and pass to debugger #1951
Conversation
Looks like a good start to me |
@SebastianPfliegel is this ready for review or are you planning to add support for more things first? |
It's still WIP. I'll try to finish it today or tomorrow. |
@SebastianPfliegel No rush on this, but just to let you know -- we are just about to start locking down for our next release (1.14). So if you get this done by early next week we can probably include it. Else, no worries, it can ship in a later release. |
Any updates on this PR? Since we're using Docker-compose and a .env file at work, this would be a GREAT way for us to consolidate both configs as much as possible. Thanks! 😄 |
@heuristicAL, great to hear my PR is of use. I wasn't able to finish it as dotNet core was broken for my Linux distro, but it has been fixed last week, so I'll give it a try this week to finish it :) |
@SebastianPfliegel Great news! If you need any help let me know, I'm willing to give this a try, although my experience developing extensions for VS Code amounts to about.... 0. 👍 |
Haha, was the same for me. That's my first contribution regarding JavaScript/TypeScript ;) |
@SebastianPfliegel Eagerly awaiting this, any updates? |
Any updates on this? Would I be wasting my time if I were to fork out and update the PR? |
a217781
to
1b0ca96
Compare
Codecov Report
@@ Coverage Diff @@
## master #1951 +/- ##
==========================================
- Coverage 63.63% 63.33% -0.31%
==========================================
Files 88 88
Lines 4007 4020 +13
Branches 567 570 +3
==========================================
- Hits 2550 2546 -4
- Misses 1294 1311 +17
Partials 163 163
Continue to review full report at Codecov.
|
@heuristicAL & @irq: sorry for letting you wait. I squashed the commits and tested the code thoroughly. It was already skipping remarks (beginning with #). Here's some examples how the .env file gets parsed:
And this is the result:
@gregg-miskelly: care to review? :) |
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.
Aside from those two small changes, looks good to me. Thanks for taking the time to finish this up.
content.split("\n").forEach(line => { | ||
const r: RegExpMatchArray = line.match(/^\s*([\w\.\-]+)\s*=\s*(.*)?\s*$/); | ||
|
||
if (r !== null) { |
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.
Should we provide some sort of error message if this is null?
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.
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.
Also done!
package-lock.json
Outdated
@@ -6021,5130 +6021,6 @@ | |||
"once": "1.4.0" | |||
} | |||
}, | |||
"npm": { |
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 think you want to backout your changes to this file
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.
Done!
Committed your requested changes. Should I squash them? |
Yes please. |
3ab1f32
to
735a5f3
Compare
Consider it done ;) |
@gregg-miskelly: were you able to test it? |
@SebastianPfliegel Sorry for the delay. We had CI issues last week and I didn't have time to investigate. I will see if I can get this merged now... |
@akshita31: Would you mind merging this for me once the CI issues are fixed? I am going on vacation. If you need help from the debugger team chuckries is going to try and monitor things. |
@gregg-miskelly Sure, we are reverting to an older omnisharp version instead of the "latest" one for the integration tests. Will merge this, once we get the CI working. |
@SebastianPfliegel The CI issue has been fixed, but the build still fails. I pulled your branch and executed an |
@SebastianPfliegel thanks so much for doing this! I made more changes to get this to work and created a new PR with both our work -- #2462 I will close this one. If you have the time, feel free to review my PR. |
Closes #1944. Adds a new option for launch.json - envFile: it will read environment variables from the given UTF8 file. This way environment variables can be passed to the debugger and launch.json stays clean of sensitive data (like passwords).
WIP
Add similar logic for args