Skip to content
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

[Bug]: mason new does not start an interactive session #25071

Closed
lucaferranti opened this issue May 17, 2024 · 4 comments · Fixed by #25099
Closed

[Bug]: mason new does not start an interactive session #25071

lucaferranti opened this issue May 17, 2024 · 4 comments · Fixed by #25099

Comments

@lucaferranti
Copy link
Contributor

lucaferranti commented May 17, 2024

I'm using

❯ chpl --version
chpl version 2.1.0 pre-release (44b3e6b437)
  built with LLVM version 14.0.0

Just calling mason new should start an interactive session

❯ mason new --help
Usage:
    mason new [options] <project name>
    mason new                    Starts an interactive session

however this does not seem to be the case

❯ mason new
A package name must be specified

A similar issue for mason init, the documentation says it should start an interactive session, but running it only creates a Mason.toml.

Looking at masonNew.chpl, I see a proc beginInteractiveSession defined, but that is not called anywhere as far as I can tell.

@lucaferranti
Copy link
Contributor Author

lucaferranti commented May 17, 2024

As far as I can tell, the interactive functionality was introduced in this PR 4 years ago. The linked line is where the proc was called.

That function call was removed here. Looking at the description there, it seems it was intentional to remove interactivity support, in which case this would not be a bug, but doc being outdated, but not sure if the idea there was to remove interactivity only for mason init or also for mason new

@bmcdonald3
Copy link
Member

Hi Luca, yes, the interactive package initialization was removed as we decided that it was overly complex and not very helpful. For the most part, when you would use it, it would require setting up quite a few things that we don't anticipate early users to be concerned about that were only valuable when publishing a package as a brick (such as licensing) and not things that users of mason packages would be interested in. My recollection was that we were trying to get mason to be more new-user friendly and cater towards users of existing packages, rather than package developers, since users would much more likely be a much greater number than developers.

I think you are correct in pointing out that the docs are outdated. Is the interactive initialization something that you are interested in or was it more just that seeing it in the help command was confusing as it didn't reflect the actual behavior?

@lucaferranti
Copy link
Contributor Author

lucaferranti commented May 21, 2024

Thanks for the reply!

I was mainly confused by the cli documentation saying it's interactive when it isn't. I agree we don't need to have an interactive cli in the core mason. It could be nice to have a more sophisticated template for mason projects that allows to setup things interactively, but I think that would indeed be better as a third-party cli tool and not as part of core mason itself.

with a quick check, the following updates would be needed in the docs

  • mason basic usage: remove mention of mason init being interactive
  • mason new --help here: remove mention of interactive session
  • proc beginInteractiveSession is dead code and should be removed

I'll draft an MR tomorrow morning if nobody gets there first

@lydia-duncan
Copy link
Member

Noting here that Luca opened #25099 to resolve this issue. @bmcdonald3 , would you be a good person to review it?

bmcdonald3 added a commit that referenced this issue May 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants