Navigation Menu

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Utility: use Emscripten's _malloc instead of internal allocate #106

merged 2 commits into from Nov 21, 2020


Copy link

@pezcode pezcode commented Nov 18, 2020

See mosra/magnum#483 for background discussion.

I compiled with CMAKE_EXE_LINKER_FLAGS_RELEASE=-s ASSERTIONS=2 but couldn't get the old code to fire an assertion, I might have set the wrong CMake flag?

Utility::ArgumentsTest output:

OK [01] environment()
OK [02] environmentUtf8()
OK [03] copy()
OK [04] move()
OK [05] helpArgumentsOnly()
OK [06] helpNamedOnly()
OK [07] helpBoth()
OK [08] helpText()
OK [09] helpEmpty()
OK [10] helpEnvironment()
OK [11] helpEnvironmentPrefixed()
OK [12] helpAfterParse()
OK [13] helpLongKeys()
OK [14] helpLongKeyNotPrinted()
OK [15] helpFinalOptionalArgument()
OK [16] helpFinalOptionalArgumentDefaultValueOnly()
OK [17] setHelpNotFound()
OK [18] setHelpKeyForBoolean()
OK [19] duplicateKey()
OK [20] duplicateShortKey()
OK [21] emptyKey()
OK [22] disallowedCharacter()
OK [23] disallowedCharacterShort()
OK [24] disallowedIgnoreUnknown()
OK [25] arrayArgumentTwice()
OK [26] finalOptionalArgumentTwice()
OK [27] finalOptionalArgumentWithArray()
OK [28] argumentAfterFinalOptionalArgument()
OK [29] arrayArgumentAfterFinalOptionalArgument()
OK [30] parseNullptr()
Superfluous command-line argument error
OK [31] parseHelp()
OK [32] parseArguments()
OK [33] parseMixed()
OK [34] parseStringView()
OK [35] parseCustomType()
OK [36] parseCustomTypeFlags()
OK [37] parseCustomTypeUsingContainersString()
OK [38] parseEnvironment()
OK [39] parseEnvironmentUtf8()
OK [40] parseFinalOptionalArgument()
OK [41] parseFinalOptionalArgumentDefault()
OK [42] parseShortOptionValuePack()
OK [43] parseShortOptionValuePackEmpty()
OK [44] parseShortBooleanOptionPack()
OK [45] parseShortBooleanOptionValuePack()
OK [46] parseArrayArguments()
OK [47] parseArrayOptions()
OK [48] parseUnknownArgument()
OK [49] parseUnknownShortArgument()
OK [50] parseSuperfluousArgument()
OK [51] parseSingleDash()
OK [52] parseArgumentAfterSeparator()
OK [53] parseInvalidShortArgument()
OK [54] parseInvalidLongArgument()
OK [55] parseInvalidLongArgumentDashes()
OK [56] parseMissingValue()
OK [57] parseMissingOption()
OK [58] parseMissingArgument()
OK [59] parseMissingArrayArgumentMiddle()
OK [60] parseMissingArrayArgumentLast()
OK [61] prefixedParse()
OK [62] prefixedParseMinus()
OK [63] prefixedParseMinusMinus()
OK [64] prefixedParseHelpArgument()
OK [65] prefixedHelpWithoutPrefix()
OK [66] prefixedHelpWithPrefix()
OK [67] prefixedHelpLongPrefix()
OK [68] prefixedDisallowedCalls()
OK [69] prefixedDisallowedWithPrefix()
OK [70] prefixedDisallowedWithPrefixAfterSkipPrefix()
OK [71] prefixedUnknownWithPrefix()
OK [72] prefixedInvalidPrefixedName()
OK [73] prefixedInvalidUnprefixedName()
OK [74] prefixedIgnoreUnknown()
OK [75] prefixedIgnoreUnknownInvalidPrefixedName()
OK [76] notParsedYet()
OK [77] notParsedYetOnlyHelp()
OK [78] valueNotFound()
OK [79] valueMismatchedUse()
OK [80] arrayValueOutOfBounds()
OK [81] parseErrorCallback()
OK [82] parseErrorCallbackIgnoreAll()
OK [83] parseErrorCallbackIgnoreAll2()
OK [84] debugParseError()
Finished Corrade::Utility::Test::ArgumentsTest with 0 errors out of 240 checks.

@mosra mosra added this to the 2020.0b milestone Nov 18, 2020
@mosra mosra added this to TODO in Platforms via automation Nov 18, 2020
Copy link

mosra commented Nov 18, 2020

Thank you! I'll wait for @Squareys to confirm both this and mosra/magnum#483 works for him.

I compiled with CMAKE_EXE_LINKER_FLAGS_RELEASE=-s ASSERTIONS=2 but couldn't get the old code to fire an assertion, I might have set the wrong CMake flag?

I have no idea 😅 @Squareys are you able to confirm that the old code fired an assertion?

Copy link

codecov bot commented Nov 18, 2020

Codecov Report

Merging #106 (f6b77fc) into master (92daf1a) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #106   +/-   ##
  Coverage   97.56%   97.56%           
  Files          98       98           
  Lines        7193     7193           
  Hits         7018     7018           
  Misses        175      175           
Impacted Files Coverage Δ
src/Corrade/Utility/Arguments.cpp 100.00% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 92daf1a...f6b77fc. Read the comment docs.

Copy link

@mosra @pezcode Looks good!

@mosra mosra merged commit f6b77fc into mosra:master Nov 21, 2020
Platforms automation moved this from TODO to Done Nov 21, 2020
Copy link

mosra commented Nov 21, 2020

@pezcode thank you!

Took me a while to merge because Travis switched me to a trial plan and I have about one more build until I run out of the 10000 credits that I was given for the lifetime, so I need to use those scarce resources carefully 😬

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Successfully merging this pull request may close these issues.

None yet

3 participants