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

2.0-beta1 feedback #144

Closed
mvdan opened this issue Jul 30, 2017 · 6 comments
Closed

2.0-beta1 feedback #144

mvdan opened this issue Jul 30, 2017 · 6 comments
Milestone

Comments

@mvdan
Copy link
Owner

mvdan commented Jul 30, 2017

Changelog as it stands now:

Highlights:

  • syntax
    • Parser and Printer structs introduced with functional options
    • Node positions are now independent - Position merged into Pos
    • All comments are now attached to nodes
    • Support mksh - MirBSD's Korn Shell - used in Android
    • Various changes to the AST:
      • EvalClause removed; eval is no longer parsed as a keyword
      • Add Bash's TimeClause and SelectClause
      • Merge UntilClause into WhileClause
      • Improve some field names, such as ParamExp.Excl
      • Moved Stmt.Assigns to CallExpr.Assigns
      • Remove Elif - chain IfClause nodes instead
    • Support for indexed assignments like a[i]=b
    • Allow expansions in arithmetic expressions again
    • Unclosed heredocs now produce an error
    • Switch cases are no longer indented
    • Binary ops are kept in the same line - see BinaryNextLine
  • cmd/shfmt
    • Add -s, which simplifies programs via syntax.Simplify
    • Add -ln <lang>, like -ln mksh
    • Add -bn to put binary ops in the next line, like in 1.X
  • interp
    • Some progress made, though still experimental
    • Most of POSIX done - some builtins remain to be done

If there's anything that I've missed or anything that seems obviously wrong, please let me know before I do the final release. Once the release is done, no more backwards incompatible changes can be made.

Please try the binaries available here: https://github.com/mvdan/sh/releases/tag/v2.0-beta1

I have some more vacation in the following two weeks, so I expect to do the final release in mid-August.

@mvdan mvdan added this to the 2.0 milestone Jul 30, 2017
@mvdan
Copy link
Owner Author

mvdan commented Jul 30, 2017

CC @ebfe @andreynering @z0mbix @meatballhat @mmlb @hzlmn @paulbellamy @RalphCorderoy @uli42

Sorry about the mass-ping - don't want to leave anyone out :)

@hzlmn
Copy link

hzlmn commented Aug 2, 2017

Great work @mvdan Thanks a lot.

@andreynering
Copy link
Collaborator

andreynering commented Aug 3, 2017

@mvdan Maybe in the future some people can benefit from having gosh binaries also available in the release.

Otherwise, everything else seems fine. =)

@uli42
Copy link

uli42 commented Aug 3, 2017

bar | #comment1
foo | #comment2
(
   something
)

leads to

bar |
        foo |
        (#comment1
                #comment2

                something
        )

@mvdan
Copy link
Owner Author

mvdan commented Aug 5, 2017

@andreynering I haven't formally announced nor released gosh - it's not ready just yet. For example, interp is still experimental and the interactive shell is a work in progress. But I might release it along with 2.1 or 2.2 :)

@uli42 thanks for reporting, this is indeed wrong. Not a regression per se as v1 used backslashes, but still wrong. Filed the issue above.

@mvdan
Copy link
Owner Author

mvdan commented Aug 21, 2017

Thank you all - I understand there's nothing else wrong with the beta, at least for now. Please see #150 regarding the new import path, as that's the last item on my list before doing 2.0.

@mvdan mvdan closed this as completed Aug 21, 2017
@mvdan mvdan removed the help wanted label Aug 21, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants