Support Julia 0.7#8
Open
Teo-ShaoWei wants to merge 1 commit intotmlbl:masterfrom
Teo-ShaoWei:update-julia-0.7
Open
Support Julia 0.7#8Teo-ShaoWei wants to merge 1 commit intotmlbl:masterfrom Teo-ShaoWei:update-julia-0.7
Teo-ShaoWei wants to merge 1 commit intotmlbl:masterfrom
Teo-ShaoWei:update-julia-0.7
Conversation
This commit implements the latest syntax for Julia 0.7, and so might break on Julia 0.6 and before. If needs be, `Compat` can be used to assist in backward compatibility, or alternatively just break support for earlier Julia versions. Changelog:- - Update `isdefined` to include the containing module, which is compulsory. - Replace the depreciated `matchall` with an implementation using `eachmatch`. - Replace the depreciated `chr2ind` with an implementation using `eachindex`. Instead of doing index arithmetic on Unicode string which give incorrect result, use `prevind` and `nextind`. - Replace the depreciated `takebuf_string(s)` with a `String(take!(s))` call. - Replace `Base.Test` with `Test`. - Update `replace` to use a pair to indicate the replacement. - Update `parse` of integer string to state the compulsory type to map to. For now, all numeric are assumed to be `Float64` as further casting to specific integer types can be done from there. Similarly, casting to boolean is specified accordingly. - Replace `parse` with `Meta.parse` when parsing code strings. - Use logging functions `@warn` and `@error`. `warn` has been depreciated for `@warn`, and to standardise the logging we use `@error` too. This result in a `SystemError` thrown instead of an `ErrorException`. - Update REQUIRE to use Julia 0.7.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This commit implements the latest syntax for Julia 0.7, and so might break on Julia 0.6 and before. If needs be,
Compatcan be used to assist in backward compatibility, or alternatively just break support for earlier Julia versions.Changelog:-
isdefinedto include the containing module, which is compulsory.matchallwith an implementation usingeachmatch.chr2indwith an implementation usingeachindex.Instead of doing index arithmetic on Unicode string which give incorrect result, use
previndandnextind.takebuf_string(s)with aString(take!(s))call.Base.TestwithTest.replaceto use a pair to indicate the replacement.parseof integer string to state the compulsory type to map to. For now, all numeric are assumed to beFloat64as further casting to specific integer types can be done from there. Similarly, casting to boolean is specified accordingly.parsewithMeta.parsewhen parsing code strings.@warnand@error.warnhas been depreciated for@warn, and to standardise the logging we use@errortoo. This result in aSystemErrorthrown instead of anErrorException.