[Pkg-pascal-devel] Castle Game Engine 7.0-alpha.2, view3dscene 4.2.0 releases

Michalis Kamburelis michalis.kambi at gmail.com
Thu Oct 6 01:05:52 BST 2022


About the PasDoc bug on src/ui/castletiledmap_map.inc : I found the issue.

Short version: Please add to Debian a patch to remove UTF-8 BOM from
these 2 files:

  src/ui/castletiledmap_map.inc
  src/ui/castletiledmap_control.inc

This will make them work with latest stable PasDoc. From what I
tested, no other files should need it.

Longer explanation:

- Old PasDoc indeed had problems with UTF-8 BOM in include files.

    We fixed it in
https://github.com/pasdoc/pasdoc/commit/383fc0d9aced7369ed7fe55f3ffe5651879ff5ce
, followed by https://github.com/pasdoc/pasdoc/commit/2bc326bb4eb4e587c5b42cf9422e8d2f30aade96
, but it is not released as stable PasDoc yet.

- And it looks like we introduced at some point UTF-8 BOM into these
include files. Probably because Delphi (proprietary Pascal compiler
that we also now support) likes to add UTF-8 BOM. These include files
contain a Polish character in the name of contributor "Tomasz Wojtyś",
this likely provoked some software (maybe Delphi) to add or require
UTF-8 BOM there.

- For FPC, there's no need for BOM, so in Debian you can just remove the BOM.

- Of course at some point I plan to also release latest PasDoc with
this fix officially :)

My tests:

$ stable/pasdoc castletiledmap.pas --include ../common_includes/ --output=/tmp/

Warning[2]: Error EPasDoc: Invalid character ("", code 239) in Pascal
input stream (at castletiledmap_map.inc(1)) while parsing unit
castletiledmap.pas, continuing...

$ sed --in-place $'1s/^\uFEFF//' castletiledmap_control.inc
$ sed --in-place $'1s/^\uFEFF//' castletiledmap_map.inc

(sed trick from https://stackoverflow.com/a/45240995 )

$ stable/pasdoc castletiledmap.pas --include ../common_includes/ --output=/tmp/
... now goes OK

Procesing complete CGE ("./mk_docs.sh html") with old PasDoc now works
OK too, so I think these were the only 2 include files affected.

Regards,
Michalis

śr., 5 paź 2022 o 13:53 Abou Al Montacir <abou.almontacir at sfr.fr> napisał(a):
>
> Hi Michalis,
>
> Thanks for your answers
>
> On Sun, 2022-10-02 at 23:54 +0200, Michalis Kamburelis wrote:
>
> P.S. If you use fpmake compilation method, please pick this patch too
> for Debian:
>
> https://github.com/castle-engine/castle-engine/commit/77c97ef135eb5ad95c05d90edae11fa3d2863359
>
> It is already in CGE master, but slipped from 7.0-alpha.2 release, and
> I did it later.
>
> I've applied this
>
>
> ...
>
>
> The build still fails on documentation. Van you please have a look.
>
>
> Can you post/link the full output?
>
> Here is  what I found (the entire log is attached)
> Warning[2]: Error EPasDoc: Invalid character ("�", code 239) in Pascal input stream (at ./ui/castletiledmap_map.inc(1)) while parsing unit castletiledmap.pas, continuing...
>
>
> Somewhere higher should be an error from PasDoc. Maybe I need to
> release a new PasDoc version that is capable of producing docs for
> latest CGE -- I honestly don't remember whether I relied on some new
> PasDoc feature in 7.0-alpha.2, but it could have happened.
>
> I hope you can send a patch on that.
>
> --
>
> Cheers,
> Abou Al Montacir
>
> _______________________________________________
> Pkg-pascal-devel mailing list
> Pkg-pascal-devel at alioth-lists.debian.net
> https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/pkg-pascal-devel



More information about the Pkg-pascal-devel mailing list