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

Fix require nothing bug #705

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

lassepe
Copy link

@lassepe lassepe commented Aug 19, 2022

I recently hit an edge case in LazySets.jl where a @require Package="<UUID>" nothing statement would not hit the add_require dispatch in Revise because the nothing is parsed as a Symbol, not an Expression. I have thus widened the type constraint in add_expression to accept Union{Expr,Symbol} and adjusted the body to always convert to an Expr first.

The test that I added fails on master but works with this PR. However, there may be a more meaningful test to write here. I'm not too familiar with the test structure here.

@lassepe
Copy link
Author

lassepe commented Aug 25, 2022

I have no idea why the CI fails on this. The tests for the changes that I made pass locally for me.

@timholy
Copy link
Owner

timholy commented Sep 14, 2022

Presumably you need to add it as an [extras] and [targets] dependency?

Revise.jl/Project.toml

Lines 28 to 44 in ca3b5cf

[extras]
CatIndices = "aafaddc9-749c-510e-ac4f-586e18779b91"
EndpointRanges = "340492b5-2a47-5f55-813d-aca7ddf97656"
EponymTuples = "97e2ac4a-e175-5f49-beb1-4d6866a6cdc3"
Example = "7876af07-990d-54b4-ab0e-23690620f79a"
IndirectArrays = "9b13fd28-a010-5f03-acff-a1bbcff69959"
InteractiveUtils = "b77e0a4c-d291-57a0-90e8-8db25a27a240"
MacroTools = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09"
MappedArrays = "dbb5928d-eab1-5f90-85c2-b9b0edb7c900"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
Requires = "ae029012-a4dd-5104-9daa-d747884805df"
RoundingIntegers = "d5f540fe-1c90-5db3-b776-2e2f362d9394"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
UnsafeArrays = "c4a57d5a-5b31-53a6-b365-19f8c011fbd6"
[targets]
test = ["CatIndices", "EndpointRanges", "EponymTuples", "Example", "IndirectArrays", "InteractiveUtils", "MacroTools", "MappedArrays", "Random", "Requires", "RoundingIntegers", "Test", "UnsafeArrays"]

But one issue is that your new test passes for me even on Revise master, so I don't think it's testing what you think it is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants