You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mynewt.apache.org by Kevin Townsend <ke...@adafruit.com> on 2016/11/07 09:02:37 UTC

newt and newtmgr versions

I'm just migrating over to develop for mynewt-core and the newt tools 
repos, and noticed the following after updating the command line tools 
from develop:

- 'newt version' -> returns 0.9.0 in develop, this should probably be 
0.10.0 to verify that you are using something different than the master 
branch?
- 'newtmgr version' -> doesn't exist. It might be useful to add this as 
a sanity check of sorts when working with multiple branches and versions?

It's easy enough to send a pull request for these, but I wanted to check 
if these two items are perhaps intentional and maybe the 0.10.0 version 
update only happens at release?


Re: newt and newtmgr versions

Posted by Kevin Townsend <ke...@adafruit.com>.
> struct image_version {
>     uint8_t iv_major;
>     uint8_t iv_minor;
>     uint16_t iv_revision;
>     uint32_t iv_build_num;
> };
I realize this isn't the same struct used in the newt and newtmgr tools, 
but I assume the same uint32_t constraints are valid.

If a magic number of some sort is defined, perhaps it makes sense to use 
that in images to flag them as pre-releases as well? I guess that should 
be user-defined behaviour, but it would perhaps have implications with 
newt and newtmgr when working with images.

Is there a way to flag an image as pre-release or 'not for production' 
today (which also makes me wonder about perhaps having an expiration 
date but this is getting way off topic from the original thread)?

Re: newt and newtmgr versions

Posted by Kevin Townsend <ke...@adafruit.com>.
Hi Sterling,
>> I'm just migrating over to develop for mynewt-core and the newt tools 
>> repos, and noticed the following after updating the command line 
>> tools from develop:
>>
>> - 'newt version' -> returns 0.9.0 in develop, this should probably be 
>> 0.10.0 to verify that you are using something different than the 
>> master branch?
>
> +1
I submitted a pull request ticking this up on (super trivial but at 
least it's easy to integrate).  I'm not sure if NewtBlinkyTag is 
correct, though? Feel free to edit or reject if so: 
https://github.com/apache/incubator-mynewt-newt/pull/25
> We don\u2019t really have a policy here, which is why the newt version 
> hasn\u2019t been updated.  I think once we roll a release, we should always 
> update newt to the subsequent version, so that people can 
> differentiate.  We might want to have some indicator that it is built 
> off a non-released version as well (maybe a build date?)
>
If the version fields have to be integer values then perhaps in 
'develop' releases you can insert the 32-bit unix epoch timestamp as the 
last field? It isn't very human readable, but it does at least indicate 
a clear difference between updates. It seems like this would fit:

struct image_version {
     uint8_t iv_major;
     uint8_t iv_minor;
     uint16_t iv_revision;
     uint32_t iv_build_num;
};

That said, it isn't a very elegant solution.

Another alternative might be a magic number that is converted to '-dev' 
when detected. You can convert '-dev' to it's char equivalent in 
uint32_t, for example, since it's 4 bytes wide.

Re: newt and newtmgr versions

Posted by Justin Mclean <ju...@classsoftware.com>.
Hi,

> We don’t really have a policy here, which is why the newt version hasn’t been updated.  I think once we roll a release, we should always update newt to the subsequent version, so that people can differentiate. 

I know of other Apache project that do this and it works well. Also helps with JIRA in saying what version a bug is in or what version a bug was fixed in.

Thanks,
Justin


Re: newt and newtmgr versions

Posted by "David G. Simmons" <sa...@mac.com>.
> On Nov 7, 2016, at 6:15 AM, Sterling Hughes <st...@apache.org> wrote:
> 
> Hi Kevin,
> 
> On 7 Nov 2016, at 9:02, Kevin Townsend wrote:
> 
>> I'm just migrating over to develop for mynewt-core and the newt tools repos, and noticed the following after updating the command line tools from develop:
>> 
>> - 'newt version' -> returns 0.9.0 in develop, this should probably be 0.10.0 to verify that you are using something different than the master branch?
> 
> +1

I filed a bug on this in Jira a week or so ago.

> 
>> - 'newtmgr version' -> doesn't exist. It might be useful to add this as a sanity check of sorts when working with multiple branches and versions?
>> 
> 
> +1

+1

> 
>> It's easy enough to send a pull request for these, but I wanted to check if these two items are perhaps intentional and maybe the 0.10.0 version update only happens at release?
>> 
> 
> We don’t really have a policy here, which is why the newt version hasn’t been updated.  I think once we roll a release, we should always update newt to the subsequent version, so that people can differentiate.  We might want to have some indicator that it is built off a non-released version as well (maybe a build date?)

I'd like to see the 'develop' branch get a version-string of the next version to be released. So since 0.9.0 is the master branch, the develop branch should have 1.0.0-dev maybe?

dg
--
David G. Simmons
(919) 534-5099
Web <https://davidgs.com/> • Blog <https://davidgs.com/davidgs_blog> • Linkedin <http://linkedin.com/in/davidgsimmons> • Twitter <http://twitter.com/TechEvangelist1> • GitHub <http://github.com/davidgs>
/** Message digitally signed for security and authenticity.  
* If you cannot read the PGP.sig attachment, please go to 
 * http://www.gnupg.com/ <http://www.gnupg.com/> Secure your email!!!
 * Public key available at keyserver.pgp.com <http://keyserver.pgp.com/>
**/
♺ This email uses 100% recycled electrons. Don't blow it by printing!

There are only 2 hard things in computer science: Cache invalidation, naming things, and off-by-one errors.



Re: newt and newtmgr versions

Posted by Sterling Hughes <st...@apache.org>.
Hi Kevin,

On 7 Nov 2016, at 9:02, Kevin Townsend wrote:

> I'm just migrating over to develop for mynewt-core and the newt tools 
> repos, and noticed the following after updating the command line tools 
> from develop:
>
> - 'newt version' -> returns 0.9.0 in develop, this should probably be 
> 0.10.0 to verify that you are using something different than the 
> master branch?

+1

> - 'newtmgr version' -> doesn't exist. It might be useful to add this 
> as a sanity check of sorts when working with multiple branches and 
> versions?
>

+1

> It's easy enough to send a pull request for these, but I wanted to 
> check if these two items are perhaps intentional and maybe the 0.10.0 
> version update only happens at release?
>

We don\u2019t really have a policy here, which is why the newt version 
hasn\u2019t been updated.  I think once we roll a release, we should always 
update newt to the subsequent version, so that people can differentiate. 
  We might want to have some indicator that it is built off a 
non-released version as well (maybe a build date?)

Sterling