cyoung / stratux

Aviation weather and traffic receiver based on RTL-SDR.
BSD 3-Clause "New" or "Revised" License
1.06k stars 363 forks source link

Use Versioning for Golang #752

Open doodles526 opened 5 years ago

doodles526 commented 5 years ago
  1. Stratux version:

  2. Stratux config:

    SDR

    • [ ] single
    • [ ] dual

    GPS

    • [ ] yes
    • [ ] no type:

    AHRS

    • [ ] yes
    • [ ] no

    power source:

    usb cable:

  3. EFB app and version: (e.g., WingX Pro7 8.6.2)

    EFB platform: (e.g., iOS 9.2)

    EFB hardware: (e.g., iPad Mini 2)

  4. Description of your issue:

If possible, enable "Replay Logs", reproduce the problem, and provide a copy of the logs in http://192.168.10.1/logs/stratux/ and http://192.168.10.1/logs/stratux.log.

We shouldn't want external package changes to break our builds. We should be using Golang versioning. We can change to vgo when officially supported by the Go 1.12 release. But for now can use glide or similar.

Also best-practice for imports should include full path names. Eg: https://github.com/cyoung/stratux/blob/master/main/sensors.go#L11 should be changed to be github.com/cyoung/stratux/goflying/ahrs -> or another way would be to version the goflying repo against it using golang version controls, and just reference the repo directly with github.com/cyoung/goflying/ahrs

This should likely fix https://github.com/cyoung/stratux/issues/723 as well, as it will resolve the non-local import issues by having all nescessary dependencies in the ./vendor dir

cyoung commented 5 years ago

Agreed. We're using git submodules to achieve this currently. Should we wait for vgo, do you think?

doodles526 commented 5 years ago

@cyoung I think that's a good idea. Looking at this issue, it looks like module support will be fully integrated with 1.12, slated to be released in ~2 months https://github.com/golang/go/issues/27563

doodles526 commented 4 years ago

WIP https://github.com/cyoung/stratux/pull/809