Skip to content
This repository has been archived by the owner on Nov 30, 2022. It is now read-only.

Remove syn-related API #24

Merged
merged 11 commits into from
Jul 27, 2021
Merged

Conversation

scrabsha
Copy link
Contributor

No description provided.

src/diagnosis.rs Outdated Show resolved Hide resolved
src/diagnosis.rs Outdated Show resolved Hide resolved
src/diagnosis.rs Outdated Show resolved Hide resolved
src/diagnosis.rs Outdated Show resolved Hide resolved
src/glue.rs Outdated
impl Error for InvalidRustcAst {}
fn get_diagnosis(tcx: &TyCtxt) -> AnyResult<ApiCompatibilityDiagnostics> {
let (prev, curr) = get_crates_id(tcx).context("Failed to get dependencies crate id")?;
let comparator = compare(tcx, prev, curr);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👀

src/glue.rs Outdated
Ok(comparator.run(tcx))
}

pub fn get_crates_id(tcx: &TyCtxt) -> AnyResult<(CrateNum, CrateNum)> {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably not the best name here 😅

src/glue.rs Outdated

let prev_api = PublicApi::from_ast(&prev_ast);
let curr_api = PublicApi::from_ast(&curr_ast);
pub fn compare(tcx: &TyCtxt, prev: CrateNum, curr: CrateNum) -> ApiComparator {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto 😅

@scrabsha scrabsha merged commit 3985fa1 into rustc-backend Jul 27, 2021
@scrabsha scrabsha deleted the scrabsha/diagnosis-generator branch July 27, 2021 13:08
o0Ignition0o pushed a commit that referenced this pull request Aug 16, 2021
* Pass a correct `RUSTC_WRAPPER` variable to cargo

* Add diagnosis generation system for public items

* Use rustc api everywhere

* Don't emit warnings when compiling deps and glue

* Emit less data on integration tests

* Refactor the testing pipeline

* Remove too-close-to-syn code

* Completely remove syn from the project

* Remove warnings

* Remove now-useless trait_ attribute of DiagnosisItem

* A few renamings
o0Ignition0o pushed a commit that referenced this pull request Aug 16, 2021
* Pass a correct `RUSTC_WRAPPER` variable to cargo

* Add diagnosis generation system for public items

* Use rustc api everywhere

* Don't emit warnings when compiling deps and glue

* Emit less data on integration tests

* Refactor the testing pipeline

* Remove too-close-to-syn code

* Completely remove syn from the project

* Remove warnings

* Remove now-useless trait_ attribute of DiagnosisItem

* A few renamings
scrabsha pushed a commit that referenced this pull request Sep 20, 2021
* Add homemade logo (#25)

This logo was created by Morgane Gaillard and is provided under the MPL license.

(clippy warnings have been fixed, too)

* Remove syn-related API (#24)

* Pass a correct `RUSTC_WRAPPER` variable to cargo

* Add diagnosis generation system for public items

* Use rustc api everywhere

* Don't emit warnings when compiling deps and glue

* Emit less data on integration tests

* Refactor the testing pipeline

* Remove too-close-to-syn code

* Completely remove syn from the project

* Remove warnings

* Remove now-useless trait_ attribute of DiagnosisItem

* A few renamings

* Create the CompilerInvocationSettings structure

* Make "read settings from disk" a 'Settings method

* tmp

* AnyResult<Foo> => AnyResult<Self>

* use consts instead of raw  and

* wip, still not super happy with glue_gen and invocationsettings but we re getting there

* still a lot of feature envy, we re passing previous and next crate everywhere, it requires me to get back to the drawing board again. the good news is it seems to work tho

* still not there but it s getting better

* still not super happy with temp_dir / glue_path conversions here and there but it s in a good enough shape to be iterated on imo

* oopsie, a rebase leftover when fixing conflicts

* wip

* run a real compiler, please

* TMP (2)

* Make git tests pass again

Co-authored-by: o0Ignition0o <jeremy.lempereur@gmail.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants