VSCode WorkDir Workspace, main branch (2025.03.06.)
Since I will need to do some "proper development work" on this repository in the coming weeks, I had another look at whether I could teach VSCode how to build the different projects for me by the click of a button. Just because in such a setup IntelliSense works in a much more robust way than in the way that we have it set up at the moment.
And this is when I learned about "Workspaces".
https://code.visualstudio.com/docs/editor/workspaces/workspaces
That it's possible to set up workspaces with multiple directories, and that Microsoft's CMake plugin has a way of handling such workspaces.
With this MR's addition, I can now do the following:
- Set up the nightly in a terminal window that I want to work on.
[bash][Celeborn]:xaod > setupATLAS
lsetup lsetup <tool1> [ <tool2> ...] (see lsetup -h):
lsetup asetup (or asetup) to setup an Athena release
lsetup astyle ATLAS style macros
lsetup atlantis Atlantis: event display
lsetup centralpage Find samples
lsetup eiclient Event Index
lsetup emi EMI: grid middleware user interface
lsetup lcgenv lcgenv: setup tools from cvmfs SFT repository
lsetup panda Panda: Production ANd Distributed Analysis
lsetup pyami pyAMI: ATLAS Metadata Interface python client
lsetup root ROOT data processing framework
lsetup rucio distributed data management system client
lsetup scikit python data analysis ecosystem
lsetup views Set up a full LCG release
lsetup xcache XRootD local proxy cache
lsetup xrootd XRootD data access
advancedTools advanced tools menu
diagnostics diagnostic tools menu
helpMe more help
installPip install relocatable pip modules locally
installRpm install relocatable rpms locally
printMenu show this menu
queryC find / whatis container query
showVersions show versions of installed software
[bash][Celeborn]:xaod > asetup AnalysisBase,main,latest
Using AnalysisBase/25.2.45 [cmake] with platform x86_64-el9-gcc13-opt
at /cvmfs/atlas-nightlies.cern.ch/repo/sw/main_AnalysisBase_x86_64-el9-gcc13-opt/2025-03-06T0220
Unchanged: COOL_ORA_ENABLE_ADAPTIVE_OPT=Y
[bash][Celeborn]:xaod >
- Put a
package_filters.txt
file beside theathena/
clone in my development directory, like I've always done. (And how I hope most people do this...)
[bash][Celeborn]:xaod > ls -l
total 20
drwxr-xr-x 38 krasznaa krasznaa 4096 Mar 6 13:36 athena
-rw-r--r-- 1 krasznaa krasznaa 1051 Mar 6 13:08 package_filters.txt
[bash][Celeborn]:xaod >
- Open the "workspace" from this terminal, in that environment.
[bash][Celeborn]:xaod > code athena/WorkDir.code-workspace
[bash][Celeborn]:xaod >
This would put me into a setup like:
I.e. the main athena/
directory and the Projects/WorkDir
directory are opened alongside each other. This is a bit of overkill, since the athena/
directory also has access to the contents of Projects/WorkDir/
. But in this setup, as long as one has a file open "from the WorkDir directory", like Projects/WorkDir/CMakeLists.txt
as the easiest, one can just click on the "Build" button at the bottom of the window.
build/
beside the athena/
directory. And makes sure that IntelliSense would work as it should.
@fwinkl, @tadej, what do you guys think? Also, since @tadej is one of the power users, could you check that these additions would not interfere with how you use VSCode currently? Since my intention was not to break anybody's current setup.
Merge request reports
Activity
added Build main review-pending-level-1 labels
- Resolved by Tadej Novak
I keep recommending workspaces all the time, but I guess I not enough
I'm fine with the changes, but I'm conflicted if
WorkDir.code-workspace
should be committed in the repo. I would rather instruct people how to create them in the docs. On the other hand, having a sensible default makes sense (but I usually also add arun
folder to my workspaces ).The point is workspaces are nice also to store some custom configuration. I'm afraid that people would get conflicts/git issues if this is added to the repo.
- Resolved by Frank Winklmeier
CI Result SUCCESS (hash cf9eacdb)Athena AthSimulation AthGeneration AnalysisBase AthAnalysis DetCommon externals cmake make tests Full details available on this CI monitor view. Check the JIRA CI status board for known problems
Athena: number of compilation errors 0, warnings 0
AthSimulation: number of compilation errors 0, warnings 0
AthGeneration: number of compilation errors 0, warnings 0
AnalysisBase: number of compilation errors 0, warnings 0
AthAnalysis: number of compilation errors 0, warnings 0
DetCommon: number of compilation errors 0, warnings 0
For experts only: Jenkins output (remote access info)added review-user-action-required label and removed review-pending-level-1 label
added 1 commit
- 2f4668f0 - Introducing a WorkDir specific VSCode workspace.
added review-pending-level-1 label and removed review-user-action-required label
- Resolved by Attila Krasznahorkay
I also removed statements from
Projects/WorkDir/.vscode/settings.json
that were exactly the same as in.vscode/settings.json
. Since I think in this case VSCode should be smart enough to "merge" the settings from the two files in an appropriate way.Though I'm not 1000% sure.
Unfortunately I have near zero experience with flake8. So I'm not absolutely sure that the plugin is working as it should on my repository...While tweaking these settings files, I also saw this:
I.e. some of the settings are greyed out for me, with VSCode saying that they are ineffective. Should we then remove them? (Not in this MR necessarily, since they also don't seem to cause any problems at the moment.)
CI Result SUCCESS (hash 2f4668f0)Athena AthSimulation AthGeneration AnalysisBase AthAnalysis DetCommon externals cmake make tests Full details available on this CI monitor view. Check the JIRA CI status board for known problems
Athena: number of compilation errors 0, warnings 0
AthSimulation: number of compilation errors 0, warnings 0
AthGeneration: number of compilation errors 0, warnings 0
AnalysisBase: number of compilation errors 0, warnings 0
AthAnalysis: number of compilation errors 0, warnings 0
DetCommon: number of compilation errors 0, warnings 0
For experts only: Jenkins output (remote access info)Hi @akraszna ! There are open threads. Could you please have a look? Thanks, L1 (Fábio).
removed review-pending-level-1 label
added review-user-action-required label
added 1 commit
- ab9db165 - Introducing a WorkDir specific VSCode workspace.
removed review-user-action-required label
added 744 commits
-
ab9db165...d188560f - 743 commits from branch
atlas:main
- aef2bcde - Introducing a WorkDir specific VSCode workspace.
-
ab9db165...d188560f - 743 commits from branch
added review-pending-level-1 label
- Resolved by Attila Krasznahorkay
CI Result SUCCESS (hash aef2bcde)Athena AthSimulation AthGeneration AnalysisBase AthAnalysis DetCommon externals cmake make tests Full details available on this CI monitor view. Check the JIRA CI status board for known problems
Athena: number of compilation errors 0, warnings 0
AthSimulation: number of compilation errors 0, warnings 0
AthGeneration: number of compilation errors 0, warnings 0
AnalysisBase: number of compilation errors 0, warnings 0
AthAnalysis: number of compilation errors 0, warnings 0
DetCommon: number of compilation errors 0, warnings 0
For experts only: Jenkins output (remote access info)added review-approved label and removed review-pending-level-1 label
mentioned in commit fc9cf4e0