GithubHelp home page GithubHelp logo

Comments (7)

lydia-duncan avatar lydia-duncan commented on June 2, 2024 1

Do you have specific cases you want to add this for? We do expose the names of some modules that are used in ChapelStandard, so I would be open to enabling it for a couple of additional ones as the need arises. It's not as though users will frequently try to name their modules things like ChapelWhatever.

I don't like the idea of only making the internal modules' names be user-facing for the purpose of configs, that seems brittle.

I worry about adding more standard module uses to internal modules - our use chains for the internal modules are already pretty gnarly and will take some dedicated effort to untangle.

from chapel.

e-kayrakli avatar e-kayrakli commented on June 2, 2024

ChapelGpuSupport is the one that's on my cache (fixing --help tests that failed because of a config const I added there at the moment). All the configs in that file can/should be used by the user in a qualified way, none should appear in base --help output.

Making them private doesn't help with the --help output, but a step towards it, I believe.

from chapel.

bradcray avatar bradcray commented on June 2, 2024

Should we make internal modules' names user facing?

Independent of this issue (but also related to it), I don't think we should, and in fact think we should be doing more to prevent the user from being able to refer to them. Specifically, I don't think the user should be aware that the internal modules exist or be aware that they do exist. We should feel free to move the implementations of things in those modules into the compiler, into another internal module, rename the internal modules, etc. So making their names user-facing would go against this big-time (in fact, I'd love to see us remove the user's ability to refer to an internal module name prior to 2.0 if possible).

W.r.t. the specific issue of --help output, I'd probably be inclined to not print internal module config names in --help output by default—requiring some other flag to see them (like a --devel equivalent or having CHPL_DEVELOPER set).

from chapel.

lydia-duncan avatar lydia-duncan commented on June 2, 2024

in fact, I'd love to see us remove the user's ability to refer to an internal module name prior to 2.0 if possible

The vast majority of them can't be named today after Michael's change to make use statements only bring in the name with a rename. The only uses in ChapelStandard that enable it are the uses of ChapelIO, Errors, Types and AutoMath. I had forgotten that ChapelIO was a standard module and not an internal one, so all of the modules that expose their names are actually standard modules

from chapel.

bradcray avatar bradcray commented on June 2, 2024

The vast majority of them can't be named today after Michael's change to make use statements only bring in the name with a rename.

I think we can write:

use ChapelBase;

today and have it compile and run without an error. That's something I think we should put a stop to (i.e., user code referring to internal module names should generate an error).

from chapel.

lydia-duncan avatar lydia-duncan commented on June 2, 2024

Hmm. I'm not sure how I feel about that. I agree that it would be nice to make it so that users can't access those names, but I worry a bit about the implications of implementing it. I can think of two strategies off the top of my head:

  1. Just hard code a check against the flag we use to denote an internal module and ensure it doesn't get called in user code.
  • I don't like this as much. It'd be simple, but I feel like it could be brittle and developers in module code would get confused pretty easily about when they can and can't use the module name
  1. We could add a pragma for those module names to indicate that they shouldn't be callable, either in user code or outside of modules (or uses) decorated with another pragma to indicate it was okay.
  • This is slightly more work (though not much), could have the same brittleness in the implementation but does make it obvious when you can and can't use the module name. So I think I'd prefer this strategy

from chapel.

bradcray avatar bradcray commented on June 2, 2024

developers in module code would get confused pretty easily about when they can and can't use the module name

This is what I would do. I expect that developers don't find themselves wanting to type the names of internal modules very often, and that most of the time when they want to, it's within the internal modules themselves. I also think we should be optimizing for the productivity of the end-user rather than the developer (and think we could generate a specialized error when --devel is being used to explain the rules if a developer inadvertently tries to name an internal module).

from chapel.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.