CiscoDevNet / devnet-express-cc-issues

Suggested changes to the content of the learning labs for Devnet Express for Cloud Collab
MIT License
0 stars 0 forks source link

Users have issues getting their launch.json settings to take effect #15

Open cmlccie opened 6 years ago

cmlccie commented 6 years ago

The lab instructions are operating under the assumption that the participant is opening the sub-folder for each lab when they start the lab rather than opening the repository root folder or the track root folder (which is what most people do).

For Example: The lab instructions are assuming that the the participants are directly opening collab-spark-chatops-bot-itp when working on that lab and not devnet-express-cloud-collab-code-samples (git root) or collab-spark-chatops-bot-itp/itp (track root), which is what most people do.

The issue then is that the launch.json file that the participants are editing is not where VSCode is looking for it to be, and therefore the settings therein aren't being used by VSCode.

VSCode is looking for the file to be here ${workspaceRoot}/.venv/launch.json, VSCode project looks like this:

itp [mycode]$ tree -a
.
├── LM-4402
│   ├── 04-coding-python-json
│   │   ├── json-parse-loop-sol.py
…
├── collab-spark-chatops-bot-itp
│   ├── .vscode
│   │   └── launch.json
│   ├── README.md
│   ├── chatops.py
│   └── ciscosparkapi.py
├── collab-spark-ciscosparkapi-itp
│   └── challenge.py
…
64 directories, 346 files

...but what it actually looks like is this ${workspaceRoot}/itp/collab-spark-chatops-bot-itp/.vscode/launch.json:

itp [mycode]$ tree -a
.
├── LM-4402
│   ├── 04-coding-python-json
│   │   ├── json-parse-loop-sol.py
…
├── collab-spark-chatops-bot-itp
│   ├── .vscode
│   │   └── launch.json
│   ├── README.md
│   ├── chatops.py
│   └── ciscosparkapi.py
├── collab-spark-ciscosparkapi-itp
│   └── challenge.py
…
64 directories, 346 files

Note: There are a few .vscode settings folders throughout the sample-code repository.

itp [mycode]$ tree -a -P .vscode
.
├── collab-spark-bot-mission-itp
│   └── .vscode
├── collab-spark-botl-itp
│   └── .vscode
├── collab-spark-chatops-bot-itp
│   └── .vscode
├── collab-tools-visual-studio-code-ide-itp
│   └── .vscode
├── collab-tropo-spark-sms-bot-itp
│   └── .vscode
└── collab-tropo-spark-sms-bot-vscode-itp
    └── .vscode

Workaround: Have the participants open each sub-folder (like a new project) every time they begin working on a new lab.

Recommended Solutions:

  1. Don't use VSCode. Simplify the toolchain to use IDLE for editing and a BASH terminal for running scripts.
  2. Improve the VSCode workflows, which should include opening the repository root and working from that single root for all labs. This would neccessitate consolidating the .vscode folders, settings and launch.json files.
  3. Update the labs to provide instructions and warnings that clearly communicate how they should be "opening" the lab subfolders for each lab exercise.
stgreenb commented 6 years ago

I think this relates back to https://github.com/CiscoDevNet/devnet-express-cloud-collab/issues/174

ObjectIsAdvantag commented 6 years ago

good catch @stgreenb also check CiscoDevNet/devnet-express-cloud-collab#173 for enhancements idea