Skip to content

Commit

Permalink
Restore Geometry.h with a deprecation message
Browse files Browse the repository at this point in the history
Summary:
In [this commit](e6cba99), we renamed `Geometry.h` to `Vector.h`.
This is the last change of a series of updates that progressively altered the shape of `Geometry.h` from its [original version](https://github.com/facebook/react-native/blob/0.71-stable/ReactCommon/react/renderer/graphics/Geometry.h).

This is a breaking change as several libraries in the OSS are depending on Geometry.h and we removed it without deprecating it.
This change aims to put the file back, with a deprecation message, so that we can safely remove it in the next version.

## Changelog
[General][Fixed] - Restore Geometry.h to avoid breaking change

Reviewed By: cortinico

Differential Revision: D43621983

fbshipit-source-id: 96b976901f7ec337f2ec64c592e4b4d19d89ab11
  • Loading branch information
cipolleschi authored and facebook-github-bot committed Feb 27, 2023
1 parent b360109 commit 7620509
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions ReactCommon/react/renderer/graphics/Geometry.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

#pragma once

#include <react/renderer/graphics/Float.h>
#include <react/renderer/graphics/Point.h>
#include <react/renderer/graphics/Rect.h>
#include <react/renderer/graphics/RectangleCorners.h>
#include <react/renderer/graphics/RectangleEdges.h>
#include <react/renderer/graphics/Size.h>
#include <react/renderer/graphics/Vector.h>

#warning \
"The Geometry.h file is deprecated and will be removed in the next version of React Native. Please update your #include and #import statements to use the specific files. For example, if you imported Geometry.h to use Float.h, replase the #include <react/renderer/graphics/Geometry.h> with #include <react/renderer/graphics/Float.h>"

0 comments on commit 7620509

Please sign in to comment.