1. 18 Aug, 2023 2 commits
  2. 14 Aug, 2023 2 commits
  3. 10 Aug, 2023 2 commits
  4. 02 Aug, 2023 1 commit
  5. 28 Jul, 2023 1 commit
  6. 24 Jul, 2023 1 commit
  7. 21 Jul, 2023 1 commit
  8. 18 Jul, 2023 1 commit
    • Tae Hyung Kim's avatar
      Relax syntax for gen-l10n (#130736) · c6b93b2d
      Tae Hyung Kim authored
      To preserve backward compatibility with the old parser which would
      ignore syntax errors, this PR introduces a way to treat the special
      characters `{` and `}` in the following way:
      1. If we encounter a `{` which searching for a string token and this `{`
      is not followed by a valid placeholder, then we treat the `{` as a
      string and continue lexing for strings.
      2. If we encounter a `}` while not within some expression (i.e.
      placeholders, arguments, plurals, or selects), then we treat the `}` as
      a string and continue lexing for strings.
      
      This makes it so that
      ```
      "helloWorld": "{ } { placeholder }",
      "@@helloWorld": {
        "placeholders": {
          "placeholder" {}
        }
      }
      ```
      treats the `{ }` as a string while `{ placeholder } ` is treated as a
      placeholder.
      
      Fixes https://github.com/flutter/flutter/issues/122404.
      c6b93b2d
  9. 17 Jul, 2023 2 commits
  10. 13 Jul, 2023 1 commit
    • Matan Lurey's avatar
      Always escape when writing pubspec.yaml's 'description' field. (#130096) · 03749051
      Matan Lurey authored
      Closes https://github.com/flutter/flutter/issues/80013.
      
      **Before**:
      
      ```
      $ flutter create test1 --description "a: b"
      Creating project test1...
      Error detected in pubspec.yaml:
      Error on line 2, column 15: Mapping values are not allowed here. Did you miss a colon earlier?
        ╷
      2 │ description: a: b
        │               ^
        ╵
      Please correct the pubspec.yaml file at /Users/matan/Developer/scratch/test1/pubspec.yaml
      ```
      
      **After**:
      
      ```
      $ flutter create test1 --description "a: b"
      Creating project test1...
      Resolving dependencies in test1... 
      Got dependencies in test1.
      Wrote 129 files.
      
      All done!
      You can find general documentation for Flutter at: https://docs.flutter.dev/
      Detailed API documentation is available at: https://api.flutter.dev/
      If you prefer video documentation, consider: https://www.youtube.com/c/flutterdev
      
      In order to run your application, type:
      
        $ cd test1
        $ flutter run
      
      Your application code is in test1/lib/main.dart.
      ```
      
      ---
      
      It's worth noting that this _always_ escapes a non-empty project description, which means that descriptions that were not previously wrapped in `"`s' will be. I'm not sure how worth it is to do a _conditional_ escape (i.e. only escape if not escaping would cause a problem), but willing to change.
      
      Side-note: I had no idea where to list this test in the (very large) `create_test.dart`, so I did my best :)
      03749051
  11. 10 Jul, 2023 1 commit
  12. 22 Jun, 2023 2 commits
  13. 16 Jun, 2023 1 commit
  14. 15 Jun, 2023 2 commits
  15. 14 Jun, 2023 1 commit
  16. 13 Jun, 2023 1 commit
  17. 09 Jun, 2023 3 commits
  18. 07 Jun, 2023 1 commit
  19. 02 Jun, 2023 2 commits
  20. 31 May, 2023 1 commit
  21. 26 May, 2023 1 commit
  22. 23 May, 2023 1 commit
    • Ian Hickson's avatar
      Give channel descriptions in `flutter channel`, use branch instead of upstream... · 9c7a9e77
      Ian Hickson authored
      Give channel descriptions in `flutter channel`, use branch instead of upstream for channel name (#126936)
      
      ## How we determine the channel name
      
      Historically, we used the current branch's upstream to figure out the current channel name. I have no idea why. I traced it back to https://github.com/flutter/flutter/pull/446/files where @abarth implement this and I reviewed that PR and left no comment on it at the time.
      
      I think this is confusing. You can be on a branch and it tells you that your channel is different. That seems weird.
      
      This PR changes the logic to uses the current branch as the channel name.
      
      ## How we display channels
      
      The main reason this PR exists is to add channel descriptions to the `flutter channel` list:
      
      ```
      ianh@burmese:~/dev/flutter/packages/flutter_tools$ flutter channel
      Flutter channels:
        master (tip of tree, for contributors)
        main (tip of tree, follows master channel)
        beta (updated monthly, recommended for experienced users)
        stable (updated quarterly, for new users and for production app releases)
      * foo_bar
      
      Currently not on an official channel.
      ianh@burmese:~/dev/flutter/packages/flutter_tools$
      ```
      
      ## Other changes
      
      I made a few other changes while I was at it:
      
      * If you're not on an official channel, we used to imply `--show-all`, but now we don't, we just show the official channels plus yours. This avoids flooding the screen in the case the user is on a weird channel and just wants to know what channel they're on.
      * I made the tool more consistent about how it handles unofficial branches. Now it's always `[user branch]`.
      * I slightly adjusted how unknown versions are rendered so it's clearer the version is unknown rather than just having the word "Unknown" floating in the output without context.
      * Simplified some of the code.
      * Made some of the tests more strict (checking all output rather than just some aspects of it).
      * Changed the MockFlutterVersion to implement the FlutterVersion API more strictly.
      * I made sure we escape the output to `.metadata` to avoid potential injection bugs (previously we just inlined the version and channel name verbatim with no escaping, which is super sketchy).
      * Tweaked the help text for the `downgrade` command to be clearer.
      * Removed some misleading text in some error messages.
      * Made the `.metadata` generator consistent with the template file.
      * Removed some obsolete code to do with the `dev` branch.
      
      ## Reviewer notes
      
      I'm worried that there are implications to some of these changes that I am not aware of, so please don't assume I know what I'm doing when reviewing this code. :-)
      9c7a9e77
  23. 22 May, 2023 1 commit
  24. 20 May, 2023 1 commit
  25. 19 May, 2023 1 commit
  26. 17 May, 2023 1 commit
  27. 16 May, 2023 2 commits
  28. 15 May, 2023 1 commit
  29. 11 May, 2023 2 commits