Follow-up Comment #2, bug #19868 (project freeciv):

> On Thu, Jul 5, 2012 at 6:38 PM, Marko Lindqvist wrote:
> Can you send your current patch as an reference what kind of results we are
> talking here?
>
Hopefully the patch will get uploaded to Gna for real this time. This is the
patch that I believed was uploaded last time. The initial message about how it
is a draft to explain the concept, contain bugs and was made in a hurry still
apply. I'm no longer sure my patch is useful enough to be committed. I'll try
to explain the patch better and then why I now doubt its usefulness.

The patch label items referred to by packets.def as used in the network
protocol by adding (or modifying) a comment unless I could see it mentioned.
The comments are not created to be machine readable (fixable). Items referred
to by items referred to by packets.def are seen as referred to by packets.def.
My previous statement applies recursively. (A dependency of a dependency of a
dependency is seen as referred to) Some items, like universal (and/or its
dependencies), may be missing because my code generator get them from manual
definitions. All knowledge the Freeciv sources has in a highly imperative form
is defined by hand so items like the functions in dataio.c are missing.

At the time I wrote the patch my understanding of the cap string was close to
"will it, assuming the other party isn't lying, make it easy for software to
know things are different from the beginning of the connection so an
appropriate action can be taken (like warning a human, asking
someone/something for more information or starting collecting data to learn
what has changed even before an unknown element is encountered)". During our
conversation on patch 3345 I realized that this isn't the case. This mean that
the added comments won't help developers know when to update the cap string.
If made machine readable it may be of some use to tools but then the
information would have to be kept updated and that would be extra work for
little gain (said the guy that already had software determining and extracting
dependencies for packets from the rest of the Freeciv source code). Adding
some comments to packets.def may be a better way to give hints to
reimplementers.

On Thu, Jul 5, 2012 at 10:38 PM, Gilles J. Seguin wrote:
> And packets.def is having it "all".
> You will find nothing else elsewhere.
>
I found the definitions of bitvectors (used as field types where the defined
length of the bitvector decides how many bytes should be read from/written to
the network), constants (used to limit the size of some fields), enums (used
as field types), functions that (imperatively) describe how to translate
various data types to/from the network, etc. This doesn't matter to
implementations that use the rest of (the same version of) the Freeciv source
code as they get those items there. Other implementations need a way, manually
or automatically, to get the information and convert it to a proper format
(like source code).

(file #15991)
    _______________________________________________________

Additional Item Attachment:

File name: labelProtoChangesDraft.patch   Size:13 KB


    _______________________________________________________

Reply to this item at:

  <http://gna.org/bugs/?19868>

_______________________________________________
  Message sent via/by Gna!
  http://gna.org/


_______________________________________________
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to