Skip to content

feature offline mode. #12

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

Merged
merged 11 commits into from
Aug 30, 2019
Merged

feature offline mode. #12

merged 11 commits into from
Aug 30, 2019

Conversation

pchampio
Copy link
Member

@pchampio pchampio commented Jul 19, 2019

  • hover doesn't update on every run
  • fixes: Hover: offline building go-flutter#169
  • provide a hover upgrade command (to upgrade the current project )
  • every 2 days a check is made to see if the current project tags uses the last
    github release. if a new release is available print a message about
    hover upgrade
  • adds more debug message, 'bundling flutter', 'compiling
    go-flutter', 'running project',...
  • only print the 'channel beta' message if the user is on master,
    if the user was on stable the message was printed for no reason.

The behaviour of hover run and hover build is the same as before
when --branch is provided.
But there is a little twist, if the current version is a valid release
(available on github), hover run will not overwrite the 'go-flutter'
version. Example:

$ hover run --branch '@v0.20.0'
$ hover run # no upgrade trigged running on v0.20.0, at some point you
            # will get a `hover upgrade` notice

$ hover upgrade # user has to run to upgrade away from v0.20.0

$

$ hover run --branch '@master'
$ #THEN
$ hover run # auto upgrade trigged! Not a real release.
            # If the user hasn't access to internet, fail silently and
            # keep using '@master'

To check every two days, a hidden file ./desktop/.last_goflutter_check
is created on a project bases, the file contains a timestamps indicating
the last hover update check.

About the hover repo:
A empty go.mod file has been added to hover/assets/app/ this prevent adding
go-flutter as a go mod dependency. (because go mod tidy was peeking
hover/asset/options.go as a hover code file)

fixes: go-flutter-desktop/go-flutter#239

  - fixes: go-flutter-desktop/go-flutter#169
 - provide a `hover upgrade `command (like flutter upgrade)
 - every 2 days a check is made to see if the current project tags uses the last
   github release. if a new release is available print a message about
   `hover upgrade`
 - adds more debug message, 'bundling flutter', 'compiling
   go-flutter', 'running project',...
 - only print the 'channel beta' message if the user is on master,
  if the user was on stable the message was printed for no reason.

The behaviour of `hover run` and `hover build` is the same as before
when `--branch` is provided.
But there is a little twist, if the current version is a valid release
(available on github), `hover run` will not overwrite the 'go-flutter'
version. Example:

```
$ hover run --branch '@v0.20.0'
$ hover run # no upgrade trigged running on v0.20.0, at some point you
            # will get a `hover upgrade` notice

$ hover upgrade # user has to run to upgrade away from v0.20.0

$

$ hover run --branch '@master'
$ hover run # auto upgrade trigged! Not a real release.
            # If the user hasn't access to internet, fail silently and
            # keep using '@master'
```

To check every two days, a hidden file `./desktop/.last_goflutter_check`
is created on a project bases, the file contains a timestamps indicating
the last hover update check.

About the hover repo:
A empty go.mod file has been added to hover/assets/app/ this prevent adding
`go-flutter` as a go mod dependency. (because `go mod tidy` was peeking
listing hover/asset/options.go as a hover code file)
@pchampio pchampio force-pushed the feature/speed-up-builds branch from 8bc9611 to 5c004e8 Compare July 19, 2019 22:47
@pchampio pchampio requested a review from GeertJohan July 19, 2019 22:49
@pchampio
Copy link
Member Author

pchampio commented Jul 25, 2019

Merge #13 into this branch before #12 is merged into master

@pchampio pchampio force-pushed the feature/speed-up-builds branch from 31247ff to fa0878b Compare August 5, 2019 09:05
When using hover only for building plugin the `flutter build bundle`
slows down the process. Add a flag to omit `flutter build bundle`.

When making changes to the flutter package only, omit `go build
'go-flutter'` with the flag omit-embedder.
@pchampio
Copy link
Member Author

pchampio commented Aug 8, 2019

add

--omit-embedder       Don't (re)compile 'go-flutter' source code, useful when only working with Dart code
--omit-flutter        Don't (re)compile the current Flutter project, useful when only working with Golang code (plugin)

to hover run

@GeertJohan
Copy link
Member

Some comments, but overall looks good.

* chore: add last_goflutter_check into gitignore

* ecosystem consideration: prefixing files with 'go-'

* add --path flag to all commands

* chore: fix indent

* Update init.go

* address the PR comments
@pchampio pchampio force-pushed the feature/speed-up-builds branch 5 times, most recently from 7a82fb8 to 42e96e2 Compare August 27, 2019 22:07
@pchampio pchampio force-pushed the feature/speed-up-builds branch from 42e96e2 to 3193bae Compare August 27, 2019 22:17
@pchampio pchampio force-pushed the feature/speed-up-builds branch from 1323cec to fca3a9c Compare August 27, 2019 22:50
adds the '.last_goflutter_check' entry to the go/.gitignore file if
needed
@pchampio
Copy link
Member Author

PTAL

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

flutter: Observatory server failed to start after 11 tries Hover: offline building
2 participants