Giter Club home page Giter Club logo

cmark's People

Contributors

krakjoe avatar remicollet avatar weltling avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cmark's Issues

Failing tests

Despite travis is green, I have 2 failing tests

=====================================================================
FAILED TEST SUMMARY
---------------------------------------------------------------------
CommonMark\Node\OrderedList [tests/Node/OrderedList/001.phpt]
CommonMark\Node\OrderedList isset start [tests/Node/OrderedList/009.phpt]
=====================================================================

$ cat tests/Node/OrderedList/001.diff
003+ int(1)
003- int(0)
006+ int(1)
006- int(0)
009+ int(1)
009- int(0)
012+ int(1)
012- int(0)

$ cat tests/Node/OrderedList/009.diff
001+ int(1)
002+ bool(true)
001- int(0)
002- bool(false)

@krakjoe can you have a look please ?

P.S. built with libcmark 0.27 (see cmark for versions available in Fedora / RHEL / CentOS), perhaps a minimal version should be documented.

pkgconfig libjit

Hi remi, can you do the pkgconfig magic for libjit in feature/jit branch please ?

cmark 1.2.0 doesn't compile with Visual Studio

Syntax like

cmark/src/block.c

Lines 89 to 95 in c71ebe2

php_cmark_assert_type(value, IS_STRING, 0,
#if PHP_VERSION_ID >= 70400
return &EG(uninitialized_zval),
#else
return,
#endif
"fence expected to be string");

isn't supported by Visual Studio compilers (and maybe others as well). The problem is that the php_cmark_assert_type macro gets resolved before the conditional compilation, and is expanded on a single line, yielding invalid syntax.

Maybe it's best to rewrite this as:

 #if PHP_VERSION_ID >= 70400 
 			php_cmark_assert_type(value, IS_STRING, 0, return &EG(uninitialized_zval), "fence expected to be string"); 
 #else 
 			php_cmark_assert_type(value, IS_STRING, 0, return, "fence expected to be string"); 
 #endif 

Appveyor

Can we get an appveyor build going please ?

I have built on windows, but am so bad at av ...

/cc @weltling

Release 1.2.0

  • Fix #13 Reflection of CommonMark\CQL::__construct has no parameters
  • Fix #14 Reflection of CommonMark\Parse doesn't have return type
  • Fix #16 Reflection of CommonMark\Parser::finish doesn't have return type
  • Add PHP 7.4 support
  • Drop PHP 7.0 / 7.1 support

I think that's it ...

Release please

Hi Remi,

Can you do a release of develop branch please ?

I have a feature branch waiting to be merged, and I'll merge into develop after release, and then work on coverage and tests and it will be included in the next release ...

segfault in test suite with 7.4.0-dev

TEST 108/268 [tests/Node/BulletList/009.phpt]
========DIFF========
001+ Termsig=11
001- bool(false)
002- bool(true)
========DONE========
FAIL CommonMark\Node\BulletList cached write tight [tests/Node/BulletList/009.phpt] 

TEST 110/268 [tests/Node/BulletList/011.phpt]
========DIFF========
001+ Termsig=11
001- int(1)
002- int(2)
========DONE========
FAIL CommonMark\Node\BulletList cached write delimiter [tests/Node/BulletList/011.phpt] 

TEST 139/268 [tests/Node/Custom/004.phpt]
========DIFF========
001+ Termsig=11
001- string(2) "OK"
002- string(2) "KO"
========DONE========
FAIL CommonMark\Node\Custom cached write onEnter [tests/Node/Custom/004.phpt] 

TEST 140/268 [tests/Node/Custom/005.phpt]
========DIFF========
001+ Termsig=11
001- string(2) "OK"
002- string(2) "KO"
========DONE========
FAIL CommonMark\Node\Custom cached write onLeave [tests/Node/Custom/005.phpt] 

TEST 182/268 [tests/Node/Heading/008.phpt]
========DIFF========
001+ Termsig=11
001- int(1)
002- int(2)
========DONE========
FAIL CommonMark\Node\Heading cached write [tests/Node/Heading/008.phpt] 

TEST 207/268 [tests/Node/Media/011.phpt]
========DIFF========
001+ Termsig=11
001- string(2) "OK"
002- string(2) "KO"
========DONE========
FAIL CommonMark\Node\Media write cached title [tests/Node/Media/011.phpt] 

TEST 208/268 [tests/Node/Media/012.phpt]
========DIFF========
001+ Termsig=11
001- string(2) "OK"
002- string(2) "KO"
========DONE========
FAIL CommonMark\Node\Media write cached url [tests/Node/Media/012.phpt] 

TEST 226/268 [tests/Node/OrderedList/007.phpt]
========DIFF========
001+ Termsig=11
001- OK
========DONE========
FAIL CommonMark\Node\OrderedList write cached start [tests/Node/OrderedList/007.phpt] 

TEST 239/268 [tests/Node/Text/007.phpt]
========DIFF========
001+ Termsig=11
001- string(2) "OK"
002- string(2) "KO"
========DONE========
FAIL CommonMark\Node\Text cached write [tests/Node/Text/007.phpt] 

windows libjit

Hi anatol,

Can you have a look at config.w32 for feature/jit branch (libjit dep, which I believe we have already in build system for pecl) please ?

PHP 8.0 compatibility

It compiles against PHP 8.0 but it's failing to allow php-fpm to start.

PHP Fatal error:  Class CommonMark\Node must implement interface Traversable as part of either Iterator or IteratorAggregate

Some of the other modules I interact with have used this release as a chance to switch to stub files (compiled with php-src/build/gen_stub.php) to automatically compile the function headers.

Should we follow suit on that? Or keep things as is as much as possible and only implement Traversable support.

Build warnings [-Wswitch]

@krakjoe can you please have a look at the build warnings related to [-Wswitch](lot of noise may hide real issues)

I have already fix the other build warnings

work/GIT/cmark/src/node.c: In function 'php_cmark_node_class':
/work/GIT/cmark/src/node.c:100:25: warning: enumeration value 'CMARK_NO_LIST' not handled in switch [-Wswitch]
   case CMARK_NODE_LIST: switch (cmark_node_get_list_type(node)) {
                         ^~~~~~
/work/GIT/cmark/src/node.c:95:2: warning: enumeration value 'CMARK_NODE_NONE' not handled in switch [-Wswitch]
  switch (cmark_node_get_type(node)) {
  ^~~~~~
/work/GIT/cmark/src/node.c: In function 'zim_Node_appendChild':
/work/GIT/cmark/src/node.c:195:2: warning: enumeration value 'PHP_CMARK_NODE_EDIT_OK' not handled in switch [-Wswitch]
  switch (php_cmark_node_edit(
  ^~~~~~
/work/GIT/cmark/src/node.c: In function 'zim_Node_prependChild':
/work/GIT/cmark/src/node.c:225:2: warning: enumeration value 'PHP_CMARK_NODE_EDIT_OK' not handled in switch [-Wswitch]
  switch (php_cmark_node_edit(
  ^~~~~~
/work/GIT/cmark/src/node.c: In function 'zim_Node_insertBefore':
/work/GIT/cmark/src/node.c:259:2: warning: enumeration value 'PHP_CMARK_NODE_EDIT_OK' not handled in switch [-Wswitch]
  switch (php_cmark_node_edit(
  ^~~~~~
/work/GIT/cmark/src/node.c: In function 'zim_Node_insertAfter':
/work/GIT/cmark/src/node.c:289:2: warning: enumeration value 'PHP_CMARK_NODE_EDIT_OK' not handled in switch [-Wswitch]
  switch (php_cmark_node_edit(
  ^~~~~~


/work/GIT/cmark/src/handlers.c: In function 'php_cmark_node_clone_impl':
/work/GIT/cmark/src/handlers.c:311:2: warning: enumeration value 'CMARK_NODE_NONE' not handled in switch [-Wswitch]
  switch (type) {
  ^~~~~~
/work/GIT/cmark/src/handlers.c:311:2: warning: enumeration value 'CMARK_NODE_DOCUMENT' not handled in switch [-Wswitch]
/work/GIT/cmark/src/handlers.c:311:2: warning: enumeration value 'CMARK_NODE_BLOCK_QUOTE' not handled in switch [-Wswitch]
/work/GIT/cmark/src/handlers.c:311:2: warning: enumeration value 'CMARK_NODE_ITEM' not handled in switch [-Wswitch]
/work/GIT/cmark/src/handlers.c:311:2: warning: enumeration value 'CMARK_NODE_PARAGRAPH' not handled in switch [-Wswitch]
/work/GIT/cmark/src/handlers.c:311:2: warning: enumeration value 'CMARK_NODE_THEMATIC_BREAK' not handled in switch [-Wswitch]
/work/GIT/cmark/src/handlers.c:311:2: warning: enumeration value 'CMARK_NODE_FIRST_BLOCK' not handled in switch [-Wswitch]
/work/GIT/cmark/src/handlers.c:311:2: warning: enumeration value 'CMARK_NODE_LAST_BLOCK' not handled in switch [-Wswitch]
/work/GIT/cmark/src/handlers.c:311:2: warning: enumeration value 'CMARK_NODE_SOFTBREAK' not handled in switch [-Wswitch]
/work/GIT/cmark/src/handlers.c:311:2: warning: enumeration value 'CMARK_NODE_LINEBREAK' not handled in switch [-Wswitch]
/work/GIT/cmark/src/handlers.c:311:2: warning: enumeration value 'CMARK_NODE_EMPH' not handled in switch [-Wswitch]
/work/GIT/cmark/src/handlers.c:311:2: warning: enumeration value 'CMARK_NODE_STRONG' not handled in switch [-Wswitch]
/work/GIT/cmark/src/handlers.c: In function 'php_cmark_node_debug_impl':
/work/GIT/cmark/src/handlers.c:376:2: warning: enumeration value 'CMARK_NODE_NONE' not handled in switch [-Wswitch]
  switch (cmark_node_get_type(parent->node)) {
  ^~~~~~
/work/GIT/cmark/src/handlers.c:376:2: warning: enumeration value 'CMARK_NODE_DOCUMENT' not handled in switch [-Wswitch]
/work/GIT/cmark/src/handlers.c:376:2: warning: enumeration value 'CMARK_NODE_BLOCK_QUOTE' not handled in switch [-Wswitch]
/work/GIT/cmark/src/handlers.c:376:2: warning: enumeration value 'CMARK_NODE_LIST' not handled in switch [-Wswitch]
/work/GIT/cmark/src/handlers.c:376:2: warning: enumeration value 'CMARK_NODE_ITEM' not handled in switch [-Wswitch]
/work/GIT/cmark/src/handlers.c:376:2: warning: enumeration value 'CMARK_NODE_PARAGRAPH' not handled in switch [-Wswitch]
/work/GIT/cmark/src/handlers.c:376:2: warning: enumeration value 'CMARK_NODE_HEADING' not handled in switch [-Wswitch]
/work/GIT/cmark/src/handlers.c:376:2: warning: enumeration value 'CMARK_NODE_THEMATIC_BREAK' not handled in switch [-Wswitch]
/work/GIT/cmark/src/handlers.c:376:2: warning: enumeration value 'CMARK_NODE_FIRST_BLOCK' not handled in switch [-Wswitch]
/work/GIT/cmark/src/handlers.c:376:2: warning: enumeration value 'CMARK_NODE_LAST_BLOCK' not handled in switch [-Wswitch]
/work/GIT/cmark/src/handlers.c:376:2: warning: enumeration value 'CMARK_NODE_SOFTBREAK' not handled in switch [-Wswitch]
/work/GIT/cmark/src/handlers.c:376:2: warning: enumeration value 'CMARK_NODE_LINEBREAK' not handled in switch [-Wswitch]
/work/GIT/cmark/src/handlers.c:376:2: warning: enumeration value 'CMARK_NODE_EMPH' not handled in switch [-Wswitch]
/work/GIT/cmark/src/handlers.c:376:2: warning: enumeration value 'CMARK_NODE_STRONG' not handled in switch [-Wswitch]


/work/GIT/cmark/src/visitor.c: In function 'php_cmark_node_accept_impl':
/work/GIT/cmark/src/visitor.c:56:3: warning: enumeration value 'CMARK_EVENT_NONE' not handled in switch [-Wswitch]
   switch (event) {
   ^~~~~~
/work/GIT/cmark/src/visitor.c:56:3: warning: enumeration value 'CMARK_EVENT_DONE' not handled in switch [-Wswitch]

Upcoming release

Given that the new release will have some bug fixes, and a new feature, but retains bc, are we calling that 1.1.0 ?

Writing docs and need to put versions numbers of new functions in, release will be maybe next Monday, when docs are finished ...

Rely on pkg-config output

IMHO pkg-config method should be the preferred way to find build option, especially on multi-arch distribution, when the lib may be installed in some not-standard path (e.g. debian)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.