-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[cling] Startup script support #11262
[cling] Startup script support #11262
Conversation
Can one of the admins verify this patch? |
cling startup scripts are different from rootlogon.C and rootrc . Question:
|
05397d3
to
652e9d0
Compare
@phsft-bot build! @jiangyilism, thanks for you PR, can you add some tests for the new functionality under |
Starting build on |
652e9d0
to
e867534
Compare
Hi @vgvassilev, To proceed further, I would like to clerify the above decisions first. Let me summarize again here:
|
e867534
to
86ef309
Compare
@Axel-Naumann , @vgvassilev Could you provide some feedback? |
@jiangyilism, thanks for your patch. I am a bit worried about the fact that upon startup cling will execute "random" code. Can you elaborate a little more about your usecase? I suspect python does something similar, can we model the feature following their approach? |
My use case is to About "execute random code", is there risk if the executed code/script is in user's home directory or |
Thanks for explaining. It all makes sense.
Well, I guess bash and python suffer from the same issue. As long as we are consistent to their practices it should be no issue. |
How about a |
Sounds good to me too. I will enumerate Search order of
Does that look good to you? |
Apologies for not reacting - this sounds terrific! Could you update the PR? |
86ef309
to
6aabddb
Compare
Updated. However the behavior is slightly different: the startup files are sorted after enumeration so the execution order is deterministic. |
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.
LGTM, please just address the spelling mistake and I'll merge!
#include <fstream> | ||
#include <vector> | ||
#include <iostream> |
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.
Thanks!
@phsft-bot build |
Starting build on |
Before showing command promt or executing scripts from argv, enumerate .C files in the directory ${CLING_HOME}/.cling.d/ in alphabetic order then .x them. Search order of ${CLING_HOME}: 1. ${CLING_HOME} envvar 2. ${XDG_CONFIG_HOME}/cling/ 3. ${HOME}/.config/cling/ 4. ${HOME}/
6aabddb
to
f816fae
Compare
Build failed on mac11/cxx14. Failing tests: |
@jiangyilism I was wondering what's the status of this PR? |
There is no pending issue as far as I know. The mac11/cxx14 test fail above is due to (flaky?) timeout so it seems irrelevant to this PR. |
@Axel-Naumann, should we merge this then? |
Thanks for your very nice contribution! |
Changes or fixes:
Implement startup script support according to this post:
https://root-forum.cern.ch/t/cling-startup-scripts-support/51358
Checklist: