Comments (7)
It seems odd that the example has an 'if false' - is that and error in the example? I suppose that either way you see the compiler-generated help.
Anyway a good example of user-overriding confit help should also call Help.printUsage() (from the Help standard module).
from chapel.
Oops, I think what happened was that I changed the test to 'true' to verify the .good file and then switched it to 'false' instead of 'help' when setting it back again.
I'm not sure I agree that good examples of providing custom help should necessarily call Help.printUsage()... I.e., maybe that's not what they would want the help message to look like.
from chapel.
With the addition of the ArgumentParser
module in v1.25, do we still want to try to support this behavior?
from chapel.
@arezaii : I'm not seeing how the addition of ArgumentParser
changes the root issue here (that defining a config
whose name happens to match a built-in flag silently loses to that flag). Does it?
from chapel.
No, you're right, it doesn't address this issue where a config
shadows a built-in. I was imagining the user could handle the --help
flag with the ArgumentParser
instead of a config
.
Do you envision a fix for this to handle just the --help
flag, or all/any Chapel defined flags, or maybe some other subset of flags?
from chapel.
I don't have a specific fix in mind, but I think the current behavior could potentially be pretty confusing to a user. I think with this specific case, it's easy to say "Well, the user should just use one of the other help capabilities that we support to get the help message they want", but I think the larger issue is that they may be using a config named help
to do something other than print out help / may not know about those features / may run into this with other similar flags.
So a very simple short-term fix would be to generate a warning for such configs indicating that they're shadowed by other built-in flags and that the user will have to use -s
or a fully-qualified --moduleName.help=
flag to set them (or should rename the variable to avoid the shadowing).
Longer-term, this relates to the discussion we've been having about the interaction between built-in flags (whether for built-in configs or other features) and arguments sent to main().
from chapel.
Longer-term, this relates to the discussion we've been having about the interaction between built-in flags (whether for built-in configs or other features) and arguments sent to main().
@arezaii - I'm not finding a public issue about this topic specifically. I know we had some discussion in https://github.com/Cray/chapel-private/issues/2289 though. Would you be able to open a public issue asking how built-in flags should interact with arguments sent to main?
from chapel.
Related Issues (20)
- printchplenv --anonymize didn't fully anonymize my output HOT 1
- Evaluate using Profile-Guided Optimization (PGO) and LLVM BOLT HOT 3
- Evaluate using Profile-Guided Optimization (PGO) and LLVM BOLT HOT 1
- Warn for whole-array assignments to outer ref arrays within parallel loops
- Support atomic types in GPU kernels
- Increase the verbosity of reporting GPU-ineligibility HOT 1
- Should we provide an interface for enabling peer-to-peer access between individual GPUs?
- Querying domains of gpu allocated arrays makes loop ineligible for GPU execution HOT 1
- Bad error message when casting to a generic class type HOT 1
- `GpuDiagnostics` does not warn when incompatible calls HOT 1
- What symbol should have an explicit intent for foralls in records/classes with array fields? HOT 1
- dyno: generic type formals don't behave according to spec
- Compile error using `dot` on slices of 3D arrays HOT 3
- Which device properties should we expose to the user? HOT 1
- Improve CPU/GPU portability
- Errors thrown in parallel loop occasionally result in `SIGSEGV(11)/SIGBUS(10)`
- Querying sublocale ID with the GPU locale model
- chpldoc does not display doc comment for MultiDecl
- Internal error when var is undefined and passed to zip HOT 2
- Promotion doesn't appear to be working with assignments to 'out' intent HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chapel.