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

Don't export functions created with setGeneric() #717

Merged
merged 7 commits into from Apr 1, 2020
Merged

Don't export functions created with setGeneric() #717

merged 7 commits into from Apr 1, 2020

Conversation

@hadley
Copy link
Member

@hadley hadley commented Sep 10, 2018

I'm pretty sure these are not necessary, and are actually harmful because they cause conflicts to be reported where conflicts don't actually exist. I confirmed this by reinstalling then running the following code:

library(lubridate)
#> 
#> Attaching package: 'lubridate'
#> The following object is masked from 'package:base':
#> 
#>     date
int1 <- interval(ymd("2001-01-01"), ymd("2002-01-01"))
int2 <- interval(ymd("2001-06-01"), ymd("2002-01-01"))
intersect(int1, int2)
#> [1] 2001-06-01 UTC--2002-01-01 UTC
@hadley hadley requested review from vspinu and jimhester Sep 10, 2018
@vspinu
Copy link
Member

@vspinu vspinu commented Sep 11, 2018

Does this help with #693?

@hadley hadley force-pushed the setGeneric branch from 8e8c767 to 7a3b601 Sep 11, 2018
@hadley
Copy link
Member Author

@hadley hadley commented Sep 11, 2018

Yes, it should do.

@vspinu
vspinu approved these changes Sep 12, 2018
@hadley

This comment has been hidden.

@vspinu

This comment has been hidden.

@hadley

This comment has been hidden.

hadley added 2 commits Nov 24, 2019
And use S3 methods instead of S4
@hadley
Copy link
Member Author

@hadley hadley commented Nov 24, 2019

Ok, now I see:

library(dplyr)
#> 
#> Attaching package: 'dplyr'
#> The following objects are masked from 'package:stats':
#> 
#>     filter, lag
#> The following objects are masked from 'package:base':
#> 
#>     intersect, setdiff, setequal, union
library(lubridate)
#> 
#> Attaching package: 'lubridate'
#> The following objects are masked from 'package:base':
#> 
#>     date, intersect, setdiff, union

int1 <- interval(ymd("2001-01-01"), ymd("2002-01-01"))
int2 <- interval(ymd("2001-06-01"), ymd("2002-01-01"))
intersect(int1, int2)
#> [1] 2001-06-01 UTC--2002-01-01 UTC

Created on 2019-11-24 by the reprex package (v0.3.0)

Conflicts:
	NAMESPACE
	R/intervals.r
@hadley hadley mentioned this pull request Mar 25, 2020
20 of 20 tasks complete
@vspinu vspinu merged commit 1413dc6 into master Apr 1, 2020
6 of 10 checks passed
6 of 10 checks passed
windows-latest (3.6) windows-latest (3.6)
Details
macOS-latest (3.6)
Details
macOS-latest (devel) macOS-latest (devel)
Details
ubuntu-16.04 (3.2)
Details
ubuntu-16.04 (3.3)
Details
ubuntu-16.04 (3.4)
Details
ubuntu-16.04 (3.5)
Details
ubuntu-16.04 (3.6)
Details
continuous-integration/travis-ci/pr The Travis CI build could not complete due to an error
Details
continuous-integration/travis-ci/push The Travis CI build could not complete due to an error
Details
@vspinu vspinu deleted the setGeneric branch Apr 1, 2020
@vspinu
Copy link
Member

@vspinu vspinu commented Apr 4, 2020

There is a new revdep failure most likely due to this change. Any ideas what is going on? Can this be fixed on our side?

@vspinu
Copy link
Member

@vspinu vspinu commented Apr 4, 2020

My understanding is that raster defines its own generics, and thus overwrites ours when xROI imports both packages. Looks to me that we cannot do much here. It should be fixed on xROI or, better, on raster package, which should be ported on top of generics.

@hadley
Copy link
Member Author

@hadley hadley commented Apr 4, 2020

Yeah, agreed.

@vspinu
Copy link
Member

@vspinu vspinu commented Apr 4, 2020

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

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.